https://github.com/sultanfariz/bun-api-starter
A simple but complete TypeScript API starter boilerplate in Bun runtime environment. Already covered transactional queries, input validation, JWT auth, and exception handling. Also helpful for VSCode user (debugger etc.)
https://github.com/sultanfariz/bun-api-starter
boilerplate bun expressjs jwt middlewares typescript vscode-debugger
Last synced: 8 months ago
JSON representation
A simple but complete TypeScript API starter boilerplate in Bun runtime environment. Already covered transactional queries, input validation, JWT auth, and exception handling. Also helpful for VSCode user (debugger etc.)
- Host: GitHub
- URL: https://github.com/sultanfariz/bun-api-starter
- Owner: sultanfariz
- Created: 2023-10-03T15:44:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-14T14:52:32.000Z (almost 2 years ago)
- Last Synced: 2023-11-14T15:49:14.966Z (almost 2 years ago)
- Topics: boilerplate, bun, expressjs, jwt, middlewares, typescript, vscode-debugger
- Language: TypeScript
- Homepage:
- Size: 102 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TypeScript Bun API Starter
A simple and customizable TypeScript API boilerplate for Bun projects.
## Table of Contents
- [Getting Started](#getting-started)
- [Installation](#installation)
- [File Structures](#file-structures)## Getting Started
### Installation
1. Clone this repository:
```sh
git clone https://github.com/yourusername/typescript-node-boilerplate.git
cd typescript-node-boilerplate
```
2. Install dependencies:
```bash
bun install
```
3. Configure the project as needed. You may need to set environment variables from **
4. To start the development server:
```bash
bun run index.ts
```
>or you also could run debugger if you use Visual Studio Code.5. Create new routes, controllers, and repositories in the src directory.
### File Structures
```
.
└── 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.