Add a start script, listen on process.env.PORT, push, and the app is live. Want a working repo first? Deploy the express starter from Templates.
Start script and port
Nixpacks installs dependencies from your lockfile, runs build if you have one, then npm start:
{
"scripts": { "start": "node server.js" },
"engines": { "node": "22.x" }
}
const port = process.env.PORT || 3000;
app.listen(port, "0.0.0.0", () => console.log(`listening on ${port}`));
Pin the Node version with engines.node (or a .node-version file). A Procfile is optional (web: npm start).
Database (optional)
wokku addons:shared:enable my-app postgres
Read process.env.DATABASE_URL in pg, Prisma or Drizzle. See Create & Link a Database.
Deploy
wokku apps:create my-app
git remote add wokku git@git.wokku.cloud:my-app
git push wokku main
Live at https://my-app.wokku.app. First deploy? See the Quickstart.
Troubleshooting
- Crashes or never responds — a hardcoded port. Use
process.env.PORT. - Install fails — commit your lockfile (
package-lock.json,pnpm-lock.yamloryarn.lock). - Background jobs — add
worker: node worker.jsto a Procfile and scale it. See Background Workers.