NODE JS INTRODUNCTION

Node JS

Introduction

Node.js is an JavaScript framework that is used to execute JavaScript code at server-side. It was designed and developed by Ryan Dahl and first released on 27, May, 2009.
It follows event-driven architecture and supported by Node.js Foundation.
It is widely used by Tech Giants Microsoft, IBM, GoDaddy, Yahoo etc.
In this tutorial, we will install Node.js on Ubuntu operating system. This whole process requires some prerequisites and includes the following steps.

program to send  request :-

var http = require('http');

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

program to print on console:-

save hello.js

console.log('This example is different!');
console.log('The result is displayed in the Command Line Interface');


No comments:

Post a Comment