🚀 Minimalistic ExpressJS and Mongo API boilerplate written in Typescript to start building RESTful APIs quickly.
Create a .env
file in the root of the project.
# Specify environment [development | staging | production]
NODE_ENV=
PORT=
# MongoDB
MONGO_URI=
# JWT
TOKEN_SECRET=
src\
|--config\ # Environment variables and configuration related things
|--utils\ # Utility classes and functions
|--middlewares\ # Custom express middlewares
|--API\v1\{endpoint}
|--controller\ # Route controllers (controller layer)
|--routes\ # Routes
|--service\ # Business logic (service layer)
|--validator\ # Request data validation schemas
|--app.js # Express app
|--index.js # App entry point
- MongoDB: A Super fast NoSQL database.
- Validation: Validates input using provided schema.
- CORS: Cross-Origin Resource-Sharing enabled.
- Linting: Auto lints code.