- Node.js is an open-source, cross-platform, Jav aScript runtime environment that executes JavaScript code outside of a browser.
- License: MIT license
- Initial release: May 27, 2009
- Original author: Ryan Dahl
- Operating system: Linux, macOS, Microsoft Windows, SmartOS, FreeBSD, OpenBSD, IBM AIX
- Written in: C, C++, JavaScript
- Node.js can generate dynamic page content
- Node.js can create, open, read, write, delete, and close files on the server
- Node.js can collect form data
- Node.js can add, delete, modify data in your database
- Node.js runs various platforms
- Website : https://nodejs.org/en/
Structure of Node.js
var http = require('http');http.createServer(function (req, res) {
res.writeHead();
res.end();
}).listen();
Advantages of Node.js
- Node.js is an open-source framework under MIT license. (MIT license is a free software license originating at the Massachusetts Institute of Technology (MIT)).
- Uses JavaScript to build entire server side application.
- Lightweight framework that includes bare minimum modules. Other modules can be included as per the need of an application.
- Asynchronous by default. So it performs faster than other frameworks.
- Cross-platform framework that runs on Windows, MAC or Linux
Disadvantage Of Node.js
- Application Programming Interface (API) is Not Stable
- Does not have a Strong Library Support System
- Asynchronous Programming Model
Example For Node.js
var http = require('http');http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World!');
}).listen(8080);
O/P: Hello world
Great work nithi and expecting more....
ReplyDelete