Skip to content

Node.js and Bun backends

Deploy a Hono app on Enzonic

Hono runs on many runtimes; on Enzonic it runs as a Node.js server (with @hono/node-server) or on Bun when your lockfile is Bun's. Deploy starts your start script, or package.json main, and routes every request to it.

At a glance

What Enzonic Deploy does with a Hono project when you connect it. You can override any of it in the project settings.

Language
TypeScript
Detected from
hono in dependencies; A start script, a main field, or server.js / index.js / app.js / src/index.js
Build command
Your build script, if any (for example tsc)
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 Hono step by step

  1. 1Add "start": "node dist/index.js" (or tsx src/index.ts) to package.json.
  2. 2Listen on process.env.PORT.
  3. 3Connect the repository and deploy.
src/index.ts
import { Hono } from 'hono';
import { serve } from '@hono/node-server';

const app = new Hono();
app.get('/', (c) => c.text('Hello from Enzonic'));

serve({ fetch: app.fetch, port: Number(process.env.PORT ?? 3000), hostname: '0.0.0.0' });

Connect a database to Hono

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.

src/routes/posts.ts
import { Hono } from 'hono';
import postgres from 'postgres';

const sql = postgres(process.env.DATABASE_URL!);
export const posts = new Hono();

posts.get('/', async (c) => c.json(await sql`select id, title from posts limit 20`));

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 engine

Things to know

  • A start script that is a plain node/bun/tsx command is run directly; anything else runs through your package manager (npm run start).

Plan limits that matter here

From the live plan data. Every plan includes previews for each branch, instant rollback, environment variables and logs.

Plan limits that matter for Hono
LimitFreePro
Build minutes3,000/mo, 1 concurrent10,000/mo, 3 concurrent
Servers1 instance, 512 MB, sleeps after 15 min idle3 always-on, 2 GB
Bandwidth150 GB/mo2 TB/mo

Compare every plan

Related guides

Ship your Hono project tonight

Connect the repository and the build settings fill themselves in. Free plan, no card.

Start free