Close

Quick intro to Node JS

[Last Updated: Aug 24, 2018]

JavaScript 

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
v8.11.3

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