π Modern DX friendly starter for Node.js/Hono APIs with the focus on simplicity and robustness.
- β¨ Node 20
- πΉ TypeScript 5
- β€οΈ Monorepo setup with Turbo and npm workspaces
- π₯ Auto reloading support for monorepo setup
- π Turbo pipeline to run tasks
- β Type and runtime safe environment variables
- π Secure headers by default for APIs
- π‘οΈCORS
- π Robust logger (credits to Practica)
- π Unique request ID (credits to Practica)
- π« Strict linting and type checking rules
- πΆ Husky for Git Hooks
- π Lint git commit with Commitlint
- π¦Ί Unit Testing with native Node.js test runner
- π¦ Optimized esbuild production artifact
- π³ Production ready Dockerfile for deployment
Manage your Node.js version automatically with Volta
git clone https://github.com/supersoniko/hono-api-starter.git
npm i
npm run turbo:start:dev:cat-topia
open http://localhost:8000
# Only build JavaScript output
npm run turbo:build:app:cat-topia
# Build and run JavaScript output
npm run turbo:start:app:cat-topia
open http://localhost:8000
This will require Fly.io CLI to be installed.
flyctl launch
flyctl deploy
The API specification is written in RapidAPI/Paw.
The specification can be be found in the root folder hono-starter-api-spec.paw
.
npm run turbo:start:debug:cat-topia
Go to the Command Pallete (β§+β+P on macOS), and search for the action "Debug: Attach to Node process".
Choose the node process that looks like this: node --inspect -r ts-node/register -r tsconfig-paths/register ./src/entry-points/api/server.ts
.
View the VS Code Debug Actions documentation for more information regarding the use of their debugger.