Dev4Diversity Express API Boilerplate is aserver side element to handle apis. Runs with MongoDB database, Use Mongoose, Passport authentication & Custom seeders.
- Run :
npm install
- Setup your environment configurations after creating an .env file at the root of the project with :
cp .env.example .env
- Finally Run :
npm run dev
You can check the link above for more information.
Location | Content |
---|---|
/src/config |
DB, Passport, Loggers & environment Configurations |
/src/controllers |
Controllers functions for routes |
/src/middlewares |
Middlewares for controllers |
/src/models |
Project Models written with Mongoose schema |
/src/models/plugins |
Plugins for mongoose models |
/src/services |
Tier services for project |
/src/routes |
Contains Routes for each version of the API |
/src/seeders |
Seeders for some models |
/src/utils |
Exported Utils functions |
/src/validation |
Endpoints & Mongoose validators & helpers |
/src/index.ts |
API Entry Point with server configurations |
Please kindly respect this project architecture in your code maintenance and update documentation in case of any changes.
Check /postman
folder to get exported postman collection
- Write Unit tests