Before you deploy: listen on PORT
Your app must accept connections on the port in the PORT environment variable, which the platform sets for you:
server.js
const port = process.env.PORT || 3000;app.listen(port, () => console.log(`listening on $${port}`));If your app insists on a fixed port, set a PORT variable on the app to that number and the platform routes traffic to it.
What the build does with your repository
If your repository has a Dockerfile at its root, it is used as it is. Otherwise the build plan is generated from your code, and for a package.json at the root that means:
- dependencies are installed with npm, pnpm, Yarn or Bun, whichever your
packageManagerfield or lockfile names (npm if neither does); - your
buildscript runs, if you have one; - the app starts with your
startscript, or else yourmainfield, or elseindex.js; - the Node.js version follows
engines.nodeinpackage.jsonor your.nvmrc, and is the current LTS when neither says.
Different start command?
Set the app’s start command (for example
node dist/main) and it is used instead. For a monorepo, set the app’s root directory to the folder that holds its package.json.Deploy it
- In the console: create a project, choose Deploy from Git, pick the repository and branch, add your environment variables and deploy. The step-by-step guide walks through each screen.
- From your terminal:
beaver apps deploy --waitfollows the build log until the app is live. See the beaver CLI. - From an AI agent: ask Claude or ChatGPT to deploy the repository; when a build fails it reads the log and fixes the start command, port or environment for you. See deploying with an AI agent.
After it is live
- Every app gets a free
techbeaver.iosubdomain with SSL, and you can point your own domain at it; certificates are issued and renewed for you. - New deploys switch traffic over only once the new version passes its health checks, so a version that fails them never takes over from the one that works.
- Build and runtime logs stream live, in the console and the CLI.
Store data in a database, not on disk
An app’s own disk does not survive a restart or a redeploy. Keep anything that matters in a managed PostgreSQL database or an S3-compatible object store.
