Introductio to Node.js

What is Node.js

It’s a open source cress-platform for server side programming. It means Node uses Java Script on the server. Node runs on various platforms. Such as windows, Linux, Unix, Mac OS.

Node can generate dynamic page content using create write delete files on the server. It means it can add, delete, modify data in the database.

Install Node.js

Go to Node,js official page and download Node.( Click here to download ) Then install Nodejs. If you have a problem,, you can use this docs to solve it.

Once you downloaded and installed Node, let’s try a simple program.

First create a Node file called “firstProgram.js” and implement this code.

var HTTP = require('http');

HTTP.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/html'});
  res.end('Hello World!');

In this code tells, print Hello World in your browser using 8080 port.