Wednesday, 6 August 2014

how to install node.js with express in linux/ubontu

Standard

today i will tell you a new cocktail this cocktail have already prepared just you need to shake and test if anything is missing or short then again mixed up and drink any one can develop by node who knows javascript, and every body know javascript so any one can developed. 
node.js is a javascript platform for server-side programming that allows users to build network applications quickly. By using Javascript on both the front-end and the back-end, development can be more consistent and be designed within the same system.
In this guide, i will show you how to get started with Node.js on an linux server.

now you need to install node in your system

first of all open terminal and type bellow command

sudo apt-get update
sudo apt-get install nodejs

If the package in the git your needs, this is all that you need to do to get set up with node.js. In most cases, you'll also want to also install npm, which is the node.js package manager. You can do this by typing:


sudo apt-get install npm

This will allow you to easily install modules and packages to use with node.js.
Because of a conflict with another package

next you need to install express, express is node framework where you can write your code using small code.

open terminal and type bellow command

npm install -g express@3.8.0

 now you need to install template engine for template parsing

sudo apt-get install jade

next go to that folder where you want write your first node program and type bellow command in your terminal

 express -s

 then bellow screen will be open


after install you will see create folders and files in your destination folder 
now type bellow command in your terminal

node app

now open browser and hit bellow link

http://localhost:3000

great you have successfully created your first step in node with express

enjoy your cocktail