Hono
Hono is an ultra-fast, edge-first web framework for building APIs and web services with TypeScript.
What create-faster adds
Beyond the official setup, we include:
Pre-configured Middleware:
- Logger middleware for request logging
- Timeout middleware (15s default)
- CORS middleware with wildcard origin and standard headers
API Structure:
- Health check endpoint (
/health/:id) with JSON response - Global error handler with dev/prod stack trace control
- 404 not found handler with JSON response
- Separation of concerns:
app.ts(routes) andindex.ts(entry point)
Development Scripts:
dev- Hot reload development server (bun run --hot)start- Production server (NODE_ENV=production bun run src/index.ts): Bun runs the source without a build, so the script setsNODE_ENVfor code that reads it at runtime (the database client turns TLS on with it)
In a turborepo, dev and start pass --port ${PORT:-<port>} with the port of the app (3000 plus its index among the apps), so a Hono app never takes the port of a web app declared before it. A single repo uses Bun's default, 3000. The PORT environment variable overrides both; see Changing the port.
With the Cloudflare deployment the app is a Worker: dev runs wrangler dev on the app port, and start, src/server.ts and @hono/node-server are not generated.
Error Handling:
- Global error handler: an
HTTPExceptionkeeps its status and message, any other error returns a genericInternal server errorwith status 500 - The message and stack of an unexpected error are returned only when
NODE_ENV=development(SST sets it undersst dev,wrangler devandwrangler deployinline it at bundle time;bun run devleaves it unset, so runNODE_ENV=development bun run devto see them in responses) - Every error is logged server side with its stack, in every environment
- Structured JSON error responses
Files created:
src/
├── app.ts # Hono app with routes and middleware
├── index.ts # Entry point (AWS Lambda or Node.js)
└── ...
package.json # Dependencies and scripts
tsconfig.json # TypeScript configurationIntegration notes:
- ORM integration: When Drizzle or Prisma is selected, database packages are included
- Turborepo: Uses
@repo/dbpackage for shared database logic - Single repo: Includes database dependencies directly

