Node.js on Express Framework Installation with mysql(UBUNTU)

Step1:

Download the node setup:

curl -sL https://deb.nodesource.com/setup | sudo bash –

Step2:

Install Node.js

sudo apt-get install -y nodejs

Step3:

Install npm and essential Add ons:

Note:

npm is the default package manager for Node.js.
As of Node.js version 0.6.3, npm is bundled and installed automatically with the environment.
npm runs through the command line and manages dependencies for an application.

sudo apt-get install -y build-essential

Step4:

Install Express Framework

sudo npm install -g express-generator

Step5:

For ceating an example application in express, please use the following link:

http://quickleft.com/blog/getting-started-with-express-in-node

Note:

To start the application use the command npm start instead of node app.js.Since we are using node package manager.

Step6:

Installation of mysql connector for node.js,please use the following link.

http://netai-nayek.blogspot.in/2014/08/connect-mysql-database-nodejs-with.html

Permanent link to this article: https://blog.openshell.in/2014/11/node-js-on-express-framework-installation-with-mysql/