Create FasterCreate Faster

Hono

Hono is an ultra-fast, edge-first web framework for building APIs and web services with TypeScript.

→ Hono Documentation

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) and index.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 sets NODE_ENV for 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 HTTPException keeps its status and message, any other error returns a generic Internal server error with status 500
  • The message and stack of an unexpected error are returned only when NODE_ENV=development (SST sets it under sst dev, wrangler dev and wrangler deploy inline it at bundle time; bun run dev leaves it unset, so run NODE_ENV=development bun run dev to 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 configuration

Integration notes:

  • ORM integration: When Drizzle or Prisma is selected, database packages are included
  • Turborepo: Uses @repo/db package for shared database logic
  • Single repo: Includes database dependencies directly

Compatible Modules

Runtime
Observability
Testing

On this page