1. Asynchronous and Event Driven: All APIs of Node.js library are asynchronous, that is, non-blocking. It essentially means a Node.js based server never waits for an API to return data. Example:

var fs = require(“fs”);

fs.readFile(‘input.txt’, function (err, data) {
if (err) return console.error(err);
console.log(data.toString());
});

console.log(“Program Ended”);

2. Single Threaded but Highly Scalable: Node.js uses a single threaded model with event looping. Event mechanism helps the server to respond in a non-blocking way and makes the server highly scalable as opposed to traditional servers which create limited threads to handle requests.

3. Fast: Node.js is built on Google Chrome’s V8 JavaScript Engine, so its library is very fast in code execution.

4. No Buffering: Node.js applications never buffer any data. These applications simply output the data in chunks.

5. License: Node.js is released under the MIT license.

Leave a Reply

Your email address will not be published. Required fields are marked *