Google News
NodeJS Interview Questions
Node.js is a powerful framework developed on Chrome’s V8 JavaScript engine that compiles the JavaScript directly into the native machine code. It is a lightweight framework used for creating server-side web applications and extends JavaScript API to offer usual server-side functionalities. It is generally used for large-scale application development, especially for video streaming sites, single page application, and other web applications.
Node.js makes building scalable network programs easy. Some of its advantages include:
* It is generally fast
* It almost never blocks
* It offers a unified programming language and data type
* Everything is asynchronous 
* It yields great concurrency
Node.js is a virtual machine that uses JavaScript as its scripting language and runs on a v8 environment. It works on a single-threaded event loop and a non-blocking I/O which provides high rate as it can handle a higher number of concurrent requests. Also, by making use of the ‘HTTP’ module, Node.js can run on any stand-alone web server. 
Node.js uses a single threaded model in order to support async processing. With async processing, an application can perform better and is more scalable under web loads. Thus, Node.js makes use of a single-threaded model approach rather than typical thread-based implementation.
There are two types of API functions in Node.js:
* Asynchronous, non-blocking functions
* Synchronous, blocking functions
A callback function is called after a given task. It allows other code to be run in the meantime and prevents any blocking.  Being an asynchronous platform, Node.js heavily relies on callback. All APIs of Node are written to support callbacks.
* The term I/O is used to describe any program, operation or device that transfers data to or from a medium and to or from another medium

* Every transfer is an output from one medium and an input into another. The medium can be a physical device, network, or files within a system
Node.js is widely used in the following applications:
* Real-time chats
* Internet of Things
* Complex SPAs (Single-Page Applications)
* Real-time collaboration tools
* Streaming applications
* Microservices architecture
NPM stands for Node Package Manager, which is responsible for managing all the packages and modules for Node.js.
Node Package Manager provides two main functionalities:
* Provides online repositories for node.js packages/modules, which are searchable on

* Provides command-line utility to install Node.js packages, and also manages Node.js versions and dependencies
The “require” command is used for importing external libraries. For example:   “var http=require (“http”)”.  This will load the http library and the single exported object through the http variable.