Skip to content

A template for building HTTP servers with Bun, featuring MongoDB integration and decorator-based endpoint definitions.

Notifications You must be signed in to change notification settings

this-mojtaba/bun-server-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bun-server-template

Welcome to the Bun Server Template! This repository uses Bun to create an HTTP server and MongoDB as the primary database. It leverages decorators to define endpoints in a clean and structured way.

Feel free to star the project and contribute by reporting or fixing any issues. 😊

Clone project:

git clone git@github.com:mojtaba-7/bun-server-template.git

Go to the directory:

cd ./bun-server-template

Configure enviroment variables

cp .env.example .env
  • Enter log file address APP_LOG_FILE"
  • Put MONGODB_URI, MONGODB_USERNAME, MONGODB_PASSWORD based on your approach

To install dependencies:

bun install

To run:

bun run start

Run as development mode:

bun run dev

Run Tests:

bun run test-all

To create an user:

bun create-user

Coding Guids:

  • use decorators to define your endpints
  • don't use any type at all

This project was created using bun init in bun v1.1.25. Bun is a fast all-in-one JavaScript runtime.

About

A template for building HTTP servers with Bun, featuring MongoDB integration and decorator-based endpoint definitions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published