Node.js

Node.jsThe discussion around JavaScript so far has been about it running in the browser and making web pages more dynamic, however, Node.js breaks from this by running on the server.

Modern web browsers incorporate a JavaScript engine that allows JavaScript to run. In order for Node.js to work, the JavaScript engine found in the Chrome web browser, known as V8, is taken out of the browser and used on a server instead. This allows it to create fast, scalable applications that work very efficiently, ideal for real-time applications that run across distributed devices.

Node.js uses an event-driven, non-blocking I/O (input/output) model. Blocking is where one operation cannot start until another has finished, tasks are run in sequence, or synchronously. As Node.js is non-blocking, or asynchronous, it can work faster, because it doesn't have to wait for one operation to be completely finished before another starts. If there is a pause in the execution of one operation, such as when it is waiting for other resources to be available, then it can start execution of another operation.

Node.js can be combined with numerous technologies, both JavaScript based and non-JavaScript based. When combined with the other JavaScript based technologies MongoDB, Express and Angular it forms what is known as a MEAN Stack application or Full Stack JavaScript application, using JavaScript in the browser and on the server, as well as incorporating the MongoDB database.

Useful Links