Install · Verified # Heroku static shell Standard heroku/nodejs buildpack (not heroku-buildpack-static). Procfile points at the snippet's server.mjs; Heroku binds $PORT dynamically. **Start here first.** Every platform recipe below assumes the canonical Express + Docker install at [/install/express-docker](/install/express-docker). The snippets on this page are the platform-specific deltas on top of that baseline. Use the standard `heroku/nodejs` buildpack — not `heroku-buildpack-static`, which would skip the runtime. Heroku reads the `Procfile` for the start command. ```text # Procfile web: node agentsite/server.mjs ``` ```text # 1. Create the app (uses heroku/nodejs buildpack — NOT static-buildpack). heroku create yoursite # 2. Config vars (encrypted at rest). heroku config:set AGENTSITE_TOKEN=asit_xxxxxxxxxxxx heroku config:set AGENTSITE_SITE=https://yoursite.com heroku config:set NPM_CONFIG_PRODUCTION=false # so 'express' installs # 3. Push. Heroku runs 'npm install' in the repo root, then 'web' from Procfile. git push heroku main ``` **Heroku binds `$PORT` dynamically.** The canonical `server.mjs` already reads `process.env.PORT`; if you set `PORT` in config vars, Heroku's dyno-assigned port will override it at runtime.