supported version of nodejs > 12, supported version of mongoose-4.0, supported version of sequelize-6.6.5
- This is a Node application, developed using MVC pattern with Node.js, ExpressJS.
$ npm install
$ npm start
├── app.js - starting point of the application
├── config - application configuration files
├── constants - contains commonly used constants
├── controller - contains business logic
├── model - models of application (DB schema files)
├── postman - API documentation - postman collection files
├── routes - contains all the routes of application
├── services - contains commonly used services
├── views - templates
└── utils - contains utility functions
- app.js
- entry point of application.
- config
- passport strategy files
- database connection files
- constants
- constants used across application.
- controllers
- Controller files that contains Business logic
├── controller
└── platform
└── <model>Controller.js - contains CRUD Operations
- middleware
- Middleware files for authentication, authorization and role-access.
- models
- Database models
- postman
- Postman collection of APIs (Import this JSON in Postman to run the APIs)
- public
- Assets used in application
- routes
├── routes
├── platform
├── <model>Routes.js - contains CRUD operation routes
└── index.js - exports model Routes
└── index.js - exports platform routes
- index.js file, exports platform routes, imported into app.js to access all the routes.
- services
├── services
├── jobs - cron jobs
└── auth.js - Authentication module service
- utils
├── utils
├── validations - joi validations files for every model
├── dbService.js - Database functions
├── messages.js - Messages used in sending response
├── responseCode.js - response codes
└── validateRequest.js - validate request based on model schema
- env files
- You can add credentials, port, database-name etc as per your environment(Development/Production).
- If you are running test environment then test cases will run using test database,and its configuration is there inside app.js