This time we will follow a complete and a smart way to create a HTTP server that is exact and quick in Node.js.

Express is insignificant and adaptable Node.JS web application framework that gives a vigorous set of gimmicks of web and portable application. What's more, it will help you in making APIs that verifiably take a shot at the HTTP protocol.

Installation
Express.JS is a framework file hosted by the Node Package Manager (NPM). For installation, we have a special node command to install on the local computer. Write the following code:
npm install [PACKAGE NAME]

And this is code for installing express:
node install express

Note: express is the package name.

After Installing, you will get a folder node_modules that consists of all the modules that you install from npm.

Finally, you have successfully installed the express module in your node folder. Now, write the following code:
// Express
var fs=require("fs");
var host="127.0.0.1";
var port="1337";

//Express
var express=require("express");
var app=express();
app.ger("/",fuction(request, response){
  response.send("Express is Working !!");
});

//Listening Socket
app.listen(port,host);


We utilize the term standard code with express on the grounds that it evacuates the undesirable lines. The code that minimizes the lines of code to do a certain task.  Also, express permits us to make a HTTP server in a couaple of lines of code. And here is the output:

I hope it works for you!

HostForLIFE.eu Node.js Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.