Node js , express .js Mvc project architecture set up :

by ahin subhra das

First we need to make a new directory for our project .After creating directory we need to run command npm init. Then we need to install node modules in our project using npm i node-modules . After that npm I for package.json must be included .

After these two packages install our project we need to make directories for
config[database configuration] - mkdir config
controllers - mkdir controllers
models
public
routes
views
Then we need to create another js file in our root folder that is app.js where our all routes and engines are merged .

For express framework we must need to include express package in our project with
npm i express , after express install we need to install nodemon for server autoreload
npm i nodemon .

After this we need to intialize our template engine . Their are many types of template engine is avaliable like pug, ejs , hbs .

For our project we use ejs .
To install ejs our project we use npm i ejs.

packedges for node :

1. npm i

* express — npm i express

2.nodemon — npm i nodemon

3.mysql- npm i mysql

4.ejs- npm i ejs

5.body parser- npm i body-parser

6.jwt- npm i jsonwebtoken

7.bcript — npm i bcrypt

8.flash — npm i flash

9.multiparty — npm i multiparty

10.fetch- npm i node-fetch

11.sequelize — npm i sequelize

12.fs — npm i fs

13.paginate — npm i paginate

14.exceljs — npm i exceljs

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store