Let’s start with the question, "What is NodeJS?"
Well, simply, Node.js is a server framework which runs on various platforms like Windows, Linux, Unix, Mac OS X. It is open source.
According to NodeJS website, "Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world."
So, what is V8?

According to Google Developers
V8 is Google’s open source high-performance JavaScript engine, written in C++ and used in Google Chrome, the open source browser from Google, and in Node.js, among others. It implements ECMAScript as specified in ECMA-262, and runs on Windows 7 or later, macOS 10.5+, and Linux systems that use IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.
More information can be found on V8's public wiki.
How to start
We need to install & setup NodeJS development environment to work with. Go to NodeJS page to download the MSI file.

Click "Next" to complete the setup. As we planned to develop a sample application using Visual Studio, please make sure that the IDE has NodeJS development package installed.
NodeJS with Visual Studio
Open Visual Studio 2017. Go to File > New > Project

A New Project window will appear; from the left menu, click JavaScript. It will show a list of sample NodeJS applications. I just started with a Blank NodeJS Web Application.

The initial sample has server.js and package.json file.
Node.js Web Server
- 'use strict';
- var http = require('http');
- var port = process.env.PORT || 1337;
- http.createServer(function (req, res) {
- res.writeHead(200, { 'Content-Type': 'text/plain' });
- res.end('Hello World\n');
- }).listen(port);
In the above code snippet, we can see that the initial sample app has a core module (HTTP) which has "http.createServer" method to handle the request from user on port 1337 with response.
Package.json
- {
- "name": "startup-nodejs",
- "version": "0.0.0",
- "description": "StartupNodejs",
- "main": "server.js",
- "author": {
- "name": "Shashangka"
- }
- }
Now, run the application. The server will respond with the below output in the browser.

Now, if we want to serve HTML pages with touting in terms of the user request, we need to go for different NodeJS Frameworks. In this post, we are using Express.js to develop sample web application which can serve HTML page.
Node.js Frameworks
Express.js, Geddy, Locomotive, Koa, Total.js, Hapi.js and more.
Express.js Web Application
To create Express.js web application. First of all, we need to install Express.js package.




Sagar ShindePosted Apr 17, 2019, 3:20 PM
Nice article. Thanks for sharing...
Zahid HasanPosted Jun 20, 2018, 1:15 AM
Good Job. . ..
imran osmanzaiPosted Feb 10, 2018, 1:37 AM
This is very integrating for my dear sir thank you
Muhammad Aqib ShehzadPosted Feb 9, 2018, 6:26 AM
Good article of node.js introduction
naveen kumarPosted Jan 23, 2018, 9:27 AM
Nice Article............
Sanwar RanwaPosted Jan 23, 2018, 4:47 AM
Really helpfull....
Hiten PandyaPosted Jan 23, 2018, 2:08 AM
Good Share...................
Sagar Pandurang KapPosted Jan 22, 2018, 11:34 PM
Nice article..........
Naresh SinghalPosted Jan 22, 2018, 11:32 PM
Good did !!.......