Loading, please wait...

A to Z Full Forms and Acronyms

Node.js Introduction | Node.js Tutorials

Jan 13, 2021 Node.js, 6204 Views
Node.js Introduction| Node.js Tutorials

Node.js Introduction| Node.js Tutorials

Nodejs is an open-source server environment and runs on various platforms be it Linux or Mac OS, or Windows, etc. It uses asynchronous programming. It can generate the dynamic page content. It is a JavaScript runtime built on the Chrome V8 JS engine. It eliminates the waiting and simply continues with the next request.  Node.js can perfectly handle Data Streaming applications, JSON APIs based applications, single-page applications.

Download NodeJs from here

Create your first Node.js Application

Import the required module

var http = require("http");

Then create server 

http.createServer(function (request, response) {
   response.writeHead(200, {'Content-Type': 'text/plain'});
   response.end('Hello TutorialsLink\n');
}).listen(8080);
console.log('Server running at http://127.0.0.1:8080/');

Then merge both of them into a single file 

var http = require("http");
http.createServer(function (request, response) {
   response.writeHead(200, {'Content-Type': 'text/plain'});
   response.end('Hello TutorialsLink\n');
}).listen(8080);
console.log('Server running at http://127.0.0.1:8080/');

Congrats you have created your first Node.js application, following will be more articles followed by. Hope you enjoyed it.

 

A to Z Full Forms and Acronyms

Related Article