Skip to content

Leka-Workshop/Bun-CRUD-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bun CRUD API with Elysia.js & MongoDB

Learn how to set up a starter Bun Rest API app from scratch that uses:

  • Database
  • Controllers
  • Hooks (Error Handling & Logging)
  • Guards
  • Security (CORS, JWT, Helmet, Rate Limiter)
  • Tests

Project Structure

📁 src
|__ 📁 controllers
|   ├── static-data.controller.ts
|   |__ users.controller.ts
|__ 📁 database
|   |__ db.setup.ts
|__ 📁 entities
|   |__ user.schema.ts
|__ 📁 startup
|   ├── docs.ts
|   ├── hooks.ts
|   |__ security.ts
📁 test
    |__ users.test.ts
.env
package.json

Get Started

  • Clone repository
  • Install dependencies bun i
  • Create .env file
  • Paste database connections
  • Have fun!

Scripts

Development

> bun dev

Test

> bun test

Production

> bun start

Built with:

  • Bun: v1.0
  • Elysia: v0.6

About

Bun CRUD API with Elysia.js & MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published