In order to install the Node.js in Ubuntu 14.04 we just need to run the following commands:
sudo apt-get update sudo apt-get install nodejsIt will not install the latest version of Node.js but it will be very stable to work with. If we want to check the Node.js installation, we can type following command and see the version:
node -vIf the above command does not work, then we can try the following command:
nodejs -vIf node of the commands do not show the Node.js version, then the Node.js installation is not correct. We will have to try the Node.js installation again. Now if we have a situation where nodejs -v works but node -v does not work, then we need to run the following command to make that work.
sudo ln -s `which nodejs` /usr/bin/nodeIn many other cases it will be necessary to install node project manager (NPM). The npm is called Node.js package manager. We can install NPM by typing following command:
sudo apt-get install npmOnce we have npm installed we can easily install express framework using following command:
sudo npm install -g express-generatorTo check whether express framework is installed or not, we can run the following command:
express -VNow we can create an application using express framework using following command:
sudo express myappOnce the application is created we can start installing dependencies using following commands:
cd myapp npm install
Comments
Post a Comment