The short answer
To deploy a Hono app, give your coding agent the sentence below. Antideploy detects Hono in your package.json and runs your start script. Hono itself does not listen on a port, so your project needs a Node server around it, usually @hono/node-server, and a start script that runs it. The server must read the PORT variable.
Say this to your coding agent
Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
What Antideploy detects
-
Hono. Detected from the
honodependency, like Express, Fastify, Koa, NestJS and hapi. -
The start command. A
Procfileweb:line wins. Otherwise it runs yourstartscript withnpm run start. -
The port. It starts your app with
PORTset. -
Earlier hosts. If your project has a
wrangler.toml, Antideploy notes that it was set up for Cloudflare before. That file is ignored.
A Hono server for Node
import { serve } from "@hono/node-server";
import { Hono } from "hono";
const app = new Hono();
app.get("/", (c) => c.text("Hello"));
serve({
fetch: app.fetch,
port: Number(process.env.PORT) || 3000,
hostname: "0.0.0.0",
});
{
"scripts": {
"build": "tsc",
"start": "node dist/index.js"
},
"dependencies": {
"@hono/node-server": "latest",
"hono": "latest"
}
}
Replace latest with the versions you use. If you write TypeScript, compile it in the build script and run the compiled file in start. A start script that needs a tool kept only in devDependencies, such as tsx, can fail, because development dependencies are removed from the image after the build.
Moving from Cloudflare Workers
A Hono app written for Workers usually ends with export default app. That works on Workers, which supply the server. It does not start a server on its own. To run it on Antideploy, keep the app as it is, add the Node adapter above, and add a start script. Code that uses Workers features, such as D1 or KV bindings, needs a replacement, for example Postgres through DATABASE_URL.
Step by step
-
Add the adapter and the start script
Install
@hono/node-server, add theservecall and astartscript. -
Paste the sentence and approve one link
Your agent creates the app, and a database if your code needs one.
-
Deploy and open the link
Antideploy installs, builds, starts your script and checks that the app answers. Your agent tells you the address.