Node.js is a server-side JavaScript platform using an event-driven, non-blocking I/O model, allowing users to build fast and scalable transaction-intensive applications running in real time. It plays a significant role in the software development world and liberates JavaScript from the web browser. With Node.js, we can reuse our JavaScript skills for general software development on a large range of systems.
It runs atop the ultra-fast JavaScript engine at the heart of Google's Chrome browser, V8, and adds a fast and robust library of asynchronous network I/O modules.Â
The primary focus of Node.js is developing high performance, highly scalable web applications, and it also sees a widespread use in other areas. Electron, the Node.js-based wrapper around the Chrome engine, is the basis for popular desktop applications, such as Atom and Visual Studio Code editors, GitKraken, Postman, Etcher, and the desktop Slack client. Node.js is popular for developing Internet of Things devices and sees a tremendous adoption in microservice development and for building tools for frontend web developers and more. Node.js, as a lightweight high-performance platform, fits microservice development like a glove.
The Node.js platform uses an asynchronous single-thread system, with asynchronously invoked callback functions (also known as event handlers) and an event loop, as opposed to a traditional thread-based architecture.
The theory is that threaded systems are notoriously difficult to develop, and that threads themselves impose an architectural burden on app servers. Node.js's goal is to provide an easy way to build scalable network servers.
The whole Node.js runtime is designed around asynchronous execution. JavaScript was chosen as the language because anonymous functions and other language elements provide an excellent base for implementing asynchronous computation.