$ npm init
$ npm install node
$ npm install express
$ npm install hbs
$ npm install mysql2
$ npm install sequelize
----------OR-----------
$ npm init
$ npm install node express hbs mysql2 sequelize #Installing all modules together
Front-End ─── db.js # database blueprint
^ | |
| V |
JQuery <-- Server <--> Routes
└───api
└─── index.js # for products and users
└─── products.js # handles and exports product data in database
└─── users.js # handles and exports user data in database
-
Connect the database
-
Start the server
$ node server.js
-
Go to http://localhost:2345
List of products will be displayed that are present in Database via JQuery
-
Add a product
via
http://localhost:2345/add_product