Skip to content

About

Hono TypeScript API starter that deploys on Cosmoner.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Hono API on Cosmoner

Deploy to Cosmoner

A small TypeScript HTTP API built with Hono on Node.js, ready to run as a web service on Cosmoner.

Route Returns
GET /health {"status":"ok"}, for health checks
GET /api/hello?name=Ada A greeting
GET /api/items A list of sample items
GET /api/items/:id One item, or a 404

Routes are in src/app.ts; src/index.ts starts the server. The sample items live in memory, so replace them with your own storage.

Deploy

Select the button above, copy the template to your GitHub account, and deploy your copy. The wizard can fill in every setting from .cosmoner/deployment.yaml: a web service, built automatically from package.json: npm run build compiles the TypeScript, and the Procfile starts node dist/index.js directly, so the server receives the shutdown signal on each redeploy and finishes in-flight requests.

Nothing needs configuring. The server listens on the port in the PORT environment variable, which Cosmoner sets for you.

Run locally

Requires Node.js 24.

npm install
npm run dev

The API answers on http://localhost:3000 and reloads when you save. To run the compiled build:

npm run build
npm start

License

MIT

About

Hono TypeScript API starter that deploys on Cosmoner.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages