A rest_api project created with the express and mongo.
The code is divided into following structure:
Contains all the routes of the system.
Bussiness logic is extracted out in this layer.
Throwing errors and error management is done in this layer.
Proper logging of the system with respect to the enviroment is handled here.
Initialing routes and other serivices and security management during start of the app is extracted out in this folder.
There are multiple middlewares to related to authentication and authorization.
DB models of different collection are defined here using mongoose.
Configuration of environment variables.
entry point
- clone the repo.
- run
npm install
in the folder to install all the dependencies. - make sure you have mongoDB installed locally into your system.
- run
node index.js
to start the system service.