Node.js and Bun backends
Deploy a Node.js app on Enzonic
A project with a start script and no build script is deployed as a generic Node.js server, whatever library it uses. This covers plain http servers, WebSocket servers and small services that need a process that stays up.
At a glance
What Enzonic Deploy does with a Node.js project when you connect it. You can override any of it in the project settings.
- Language
- JavaScript / TypeScript
- Detected from
- A start script and no build script, with no framework detected first
- Build command
- None by default
- Output
- The project folder
- Runs as
- Server
Dependencies install with the package manager your lockfile names: npm ci, pnpm install --frozen-lockfile, yarn install --immutable (Berry) or --frozen-lockfile, or bun install --frozen-lockfile. Node.js 18, 20, 22 and 24 are available. Deploy reads engines.node in package.json, then .nvmrc or .node-version, and uses Node.js 22 when nothing pins a version.
How it runs
Server
Always: your start command with PORT set.
Deploy Node.js step by step
- 1Make sure "start" runs your server and that it listens on process.env.PORT.
- 2Connect the repository and deploy.
import http from 'node:http';
http
.createServer((req, res) => {
res.writeHead(200, { 'content-type': 'text/plain' });
res.end('ok');
})
.listen(process.env.PORT ?? 3000, '0.0.0.0');Connect a database to Node.js
Create a database on Enzonic Databases (or from the project's settings) and its connection string is added to the project's environment variables. This example uses PostgreSQL.
import postgres from 'postgres';
export const sql = postgres(process.env.DATABASE_URL, { max: 10 });Postgres projects get two variables: DATABASE_URL through the connection pooler for the app, and DATABASE_URL_UNPOOLED for migrations.
PostgreSQL on Enzonic DatabasesEvery database engineThings to know
- Deploy routes HTTP to the PORT your process listens on; a process with no HTTP listener fails its health check.
Plan limits that matter here
From the live plan data. Every plan includes previews for each branch, instant rollback, environment variables and logs.
| Limit | Free | Pro |
|---|---|---|
| Build minutes | 3,000/mo, 1 concurrent | 10,000/mo, 3 concurrent |
| Servers | 1 instance, 512 MB, sleeps after 15 min idle | 3 always-on, 2 GB |
| Bandwidth | 150 GB/mo | 2 TB/mo |
Related guides
- Deploy a Express appExpress (and Koa) apps as a Node.js server.
- Deploy a Node.js functions appAn api/ folder of functions that scale to zero, with no framework at all.
- Deploy a Bun appProjects with a Bun lockfile build and run on the Bun runtime.
Ship your Node.js project tonight
Connect the repository and the build settings fill themselves in. Free plan, no card.