Node.js is an open source server-side development framework. It is one of the best and the fastest growing solution for server-side development with a huge community support. Node.js was originally written and developed by Ryan Dhal in 2009. Since then there was a huge improvement and development by the open source community and is distributed by the Node.js Foundation, which is facilitated by the Linux Foundation's collaborative project program.
What is Node.js?
Since the development and wide acceptance of JavaScript as a client-side scripting language, it's been known good only for the same purpose. But things have changed a lot, now JavaScript is everywhere from mobile applications to high-end miners and GPU intensive game development. Node.js is an open source, cross-platform JavaScript run-time environment for executing JavaScript on server-side. Node.js is built on Chrome's V8 JavaScript engine. It provides an event-driven, non-blocking (asynchronous) I/O and cross-platform runtime environment for building highly scalable server-side applications using JavaScript.
Advantages of Node.js
- NodeJS is single-threaded and asynchronous. Every I/O operation doesn’t block other operations. It means that you can read files, send emails, query the database, etc… at the same time.
- Each request to web-server does NOT create a separate NodeJS process. Instead, one NodeJS process is running at all times and listens to connections. JavaScript code is executed in the main thread of this process and all I/O operations are executed in separate threads, meaning almost no delays.
- Virtual machine in NodeJS (V8) that executes JavaScript has JIT compilation. When the virtual machine takes the source code, it can compile it to machine code at runtime. It means that “hot” functions, that get called very often, can be compiled to machine code, improving execution speed significantly.
- A single language for the entire stack is always helpful for both beginners and professional developers. A wide range of JavaScript frameworks helps this easier and more fun to work with.
Installation
Follow the installation guides for