Node.js and Bun backends
Deploy a Express app on Enzonic
Express apps deploy as they run on your machine: Deploy installs dependencies, runs your build script if you have one and starts the server. Koa is detected the same way.
At a glance
What Enzonic Deploy does with a Express project when you connect it. You can override any of it in the project settings.
- Language
- JavaScript / TypeScript
- Detected from
- express or koa in dependencies; A start script, a main field, or server.js / index.js / app.js / src/index.js / server.mjs / index.mjs
- Build command
- Your build script, if any
- 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 Express step by step
- 1Read the port from process.env.PORT.
- 2Connect the repository and deploy.
import express from 'express';
const app = express();
app.use(express.json());
app.get('/', (req, res) => res.send('Hello from Enzonic'));
app.listen(process.env.PORT ?? 3000);Connect a database to Express
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 pg from 'pg';
const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL });
export async function listPosts(req, res) {
const { rows } = await pool.query('select id, title from posts limit 20');
res.json(rows);
}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
- If package.json has neither a start script nor a main field, and none of the usual entry files exist, the build stops with "add \"start\" to package.json".
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 Fastify appFastify servers started from your start script.
- Deploy a Node.js appAny Node.js server with a start script: bots, WebSocket servers, workers with an HTTP port.
- Deploy a NestJS appNestJS APIs compiled with nest build and started from dist/main.js.
Ship your Express project tonight
Connect the repository and the build settings fill themselves in. Free plan, no card.