Quick intro to Node JS

[Last Updated: Aug 24, 2018]


Node.js is JavaScript runtime environment. It can run JavaScript from command line.

Download the latest version of Node.js from here and install it.

The Node's npm (node package manager) will also be installed. It is used to install libraries.

Check your installation:

$ node -v

A javascript file can be executed as:

$ node myfile.js

Installing http-server

http-server is simple to use http server.

To install, run following from command line:

$ npm install http-server -g

-g flag indicates to install the target package globally so that all users can use it.

To run the http-server go to the project root and run:

$ http-server