Deployment

Deploy to Vercel, Docker, or any Node.js host.

Every generated project includes a vercel.json config and can be deployed with Docker or any platform that runs Node.js.

Vercel

The generated vercel.json is ready to go:

vercel.json
{
  "version": 2,
  "builds": [
    {
      "src": "dist/server.js",
      "use": "@vercel/node",
      "config": { "maxDuration": 60, "memory": 1024 }
    }
  ],
  "routes": [
    {
      "src": "/(.*)",
      "dest": "dist/server.js",
      "methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
    }
  ]
}

Build the project

Terminal
npm run build

Deploy

Terminal
npx vercel --prod

Set your environment variables in the Vercel dashboard under Settings > Environment Variables. At minimum, set NODE_ENV=production and DATABASE_URL if you're using a database.

Vercel's serverless functions are stateless. If you're using SQLite, you'll need to switch to PostgreSQL or MySQL for production since SQLite requires a persistent filesystem.

Docker

If you enabled Docker during scaffolding, you already have a Dockerfile and docker-compose.yml. See the Docker page for the full setup.

To deploy with Docker on any host:

Terminal
docker compose up --build -d

For production, make sure to:

  • Set NODE_ENV=production in your .env
  • Use strong passwords for your database
  • Place a reverse proxy (nginx, Caddy) in front for TLS

The generated server handles SIGTERM gracefully, so Docker and Kubernetes can shut down containers without dropping in-flight requests.

Railway

Railway auto-detects Node.js projects. Push your code and set the environment variables in the dashboard.

Terminal
npm run build

Set the start command to node dist/server.js and add your environment variables (NODE_ENV, PORT, DATABASE_URL).

Railway provides managed PostgreSQL and MySQL databases that you can connect directly via DATABASE_URL.

Any Node.js host

The generated project compiles to plain JavaScript. Any platform that runs Node.js 18+ works:

Install and build

Terminal
npm ci
npm run build

Start the server

Terminal
NODE_ENV=production node dist/server.js

The server listens on the port defined by PORT (defaults to 3000). Point your reverse proxy or load balancer at that port.

Environment variables in production

At minimum, set these for any production deployment:

VariableValue
NODE_ENVproduction
PORTYour host's expected port
DATABASE_URLYour production database connection string
RATE_LIMIT_MAXAdjust based on expected traffic

See the Environment Variables page for the full list.