Categories | Libraries |
---|---|
Server | Hono.js |
Database | Drizzle ORM |
Validations | ZOD |
Logging | Pino |
OPEN Api Spec | Scalar |
- Full Typesafety with Typescript
- Opinionated Structure
- Clear and organized directory structure.
- Seperations of routes and handlers
- Validations
- Database Integration
- OPENAPI Spec Client Integrated
- Error Handling
- File stream Logging
- Testing
- Developer Experience
- Hot Reloading
- Linting and Code Formatting
All pre-configured or minimum configuration required*
- Environment - Node.JS
- Editor - VSCode (Recommended)
- Database - MySQL (pre-configured) via Drizzle ORM (configure as per needs)
-
Click the "Use this template" button: On the top-right of the repository's page, you'll see a "Use this template" button. Click it.
-
Fill in repository details: You'll be prompted to give your new repository a name and set it as public or private. After that, click "Create repository from template."
-
Clone the new repository: Once the repository is created, clone it locally
git clone https://github.com/your-username/your-new-repo.git
- Install Dependencies
# recommended (pnpm)
# npm i -g pnpm
pnpm install
Create .env file by replicating .env.example and fill as per needs. To properly run this project, you will need to setup following variables to your .env file.
Server
key | default value | available values |
---|---|---|
NODE_ENV | dev |
dev stage uat preprod prod test |
SERVER_PORT | 3000 |
number |
Logging
key | default value | available values |
---|---|---|
LOG_LEVEL | debug |
fatal error warn info debug trace |
Database
key | default value |
---|---|
DB_HOST | localhost |
DB_PORT | 3306 |
DB_USER | |
DB_PASS | |
DB_NAME |
pnpm dev
pnpm build
pnpm <command>
command | description |
---|---|
dev | start hot-reload server |
build | build javascript source |
start | start application from javascript source |
lint | linting via eslint |
lint:fix | auto-fix linting issues |
fmt | auto-format via prettier |
test | test application |
type-check | typecheck application without building |