View Code? Open in Web Editor
NEW
This is a node.js project with advanced MVC architecture
License: MIT License
JavaScript 98.50%
Handlebars 1.50%
nodejs-mvc-architecture's Introduction
Creating the MVC Architecture Using Nodejs.
- Nodejs and npm ( Core tech stack of project )
- Postgres ( for Database interactions )
- Postman ( To test out the API's )
- Create a db named
node_mvc_arch
in postgres database.
- Clone this repo.
git clone <repository_link>
- Install the node_modules in root directory of the project.
npm install
- Start the server in development mode using below command.
npm run dev
- Here it is... Your server will start successfully !
Steps to do after application is up
- Initialize the database tables (one time activity). ie. to be done if the tables are not present in database.
npm run init-db
- To reset the database schema ( Delete the current db schema & create the new one using sequelize).
npm run reset-db
- Start application in production mode.
npm run start
- API's lists and their contents are available in file
postman-api.json
. This file can be used to import the collection in postman.
- Sequelize migration documentation can be found here for reference - https://sequelize.org/docs/v6/other-topics/migrations/
- Concepts covered as part of this architecture:
- Creating Server & Router
- Database sequelize & creating models
- Authentication
- Exception Handeling
- Repositories classes
- Service classes
- Middlewares
- Validations
- Sending Emails
- Schedulers
- Loggers
- Web Sockets
nodejs-mvc-architecture's People
Contributors
Watchers