A Hono 4 REST API starter for Node.js 22, written as plain JavaScript ES modules and served by @hono/node-server. It is for developers who want a small fetch-handler API with a /health check, JSON 404 and 500 responses and node:test tests, and no database or TypeScript build.
by Light CloudREST APIs
@hono/node-server turns each Node.js request into a Web Standards Request and hands it to app.fetch, so src/app.js is an ordinary fetch handler and only src/server.js knows it is running on Node. That keeps the route code portable: moving to another runtime means swapping the server file and the one process.uptime() call in /health. Most people start by adding a sub-app such as things.js and the cors middleware from hono/cors. On Light Cloud it runs npm start in a container on the PORT the platform sets, and every push to your copy redeploys it.
Create a sub-app in src/routes/ like root.js, with const things = new Hono() and things.get(...), then mount it in src/app.js with app.route('/things', things).
CORS is off in this starter. Import cors from 'hono/cors' and add app.use('*', cors({ origin: 'https://example.com' })) in src/app.js before the routes.
The app in src/app.js is a standard fetch handler; only src/server.js is Node.js specific. Replace that file with the other runtime's entry point and change the process.uptime() call in /health.
This one has no database. The hono-postgresql-crud-api template adds PostgreSQL and a full CRUD resource on the same layout.
Yes. It has no Light Cloud code: any host with Node.js 22 runs it with npm ci --omit=dev and npm start, with PORT set.
Start a Hono CRUD API on PostgreSQL with postgres.js, validation and tests set up
Start a Node.js API with Fastify 5, request logs and in-memory tests on one dependency
Start a Node.js REST API with Express, CORS, JSON errors and tests already wired up