A simple and customizable TypeScript API boilerplate for Bun projects.
- Clone this repository:
git clone https://github.com/yourusername/typescript-node-boilerplate.git
cd typescript-node-boilerplate
- Install dependencies:
bun install
- Configure the project as needed. You may need to set environment variables from **
- To start the development server:
bun run index.ts
or you also could run debugger if you use Visual Studio Code.
- Create new routes, controllers, and repositories in the src directory.
.
└── src/
├── controllers/
│ └── ${...}Controller.ts -> configurable
└── infrastructure/
├── commons/
│ ├── exceptions/
│ │ ├── index.ts
│ │ ├── CustomError.ts
│ │ └── ${...}Error.ts -> configurable
│ └── middlewares
├── repository/
│ ├── gsheet -> configurable
│ │ └── user
│ └── prisma -> configurable
│ ├── user
│ └── admin
├── transport/
│ └── validator/
│ ├── index.ts
│ └── ${...}Schema.ts -> configurable
├── routes
└── app.ts
you can insert any file or folder on the 'configurable' mark in above diagram.