NodeJS

Node.js is an open-source, cross-platform [[JavaScript]] runtime environment that allows developers to run JavaScript on the server side. Node.js marked a significant shift in web development, enabling JavaScript to be used for server-side scripting, thereby allowing web pages to be dynamically generated on the server before being sent to the client.

Node.js uses JavaScript for server-side scripting, unifying web application development around a single programming language, rather than different languages for server-side and client-side scripts.

Node.js is an open source, cross-platform runtime environment and library that is used for running web applications outside the client’s browser.

It is used for server-side programming, and primarily deployed for non-blocking, event-driven servers, such as traditional web sites and back-end API services, but was originally designed with real-time, push-based architectures in mind. Every browser has its own version of a JS engine, and node.js is built on Google Chrome’s V8 JavaScript engine.

In simple terms, what this means is that entire sites can be run using a unified ‘stack’, which makes development and maintenance quick and easy, allowing you to focus on meeting the business goals of the project.

The fact that Node.js is open source means that it is free to use and constantly being tweaked and improved by a global community of developers.

An important thing to understand about Node.js is that it is actually neither a framework or a library - as with traditional application software -, but JavaScript a runtime environment.

A runtime environment (sometimes shortened to RTE) contains Web API’s that a developer can access to build a code, and a JavaScript engine that parses that code. This makes it lightweight, flexible and easy to deploy, all features that will help to optimize and speed up your application project.

Node.js operates on an asynchronous, non-blocking I/O model. This means that operations like reading files, network requests, or database operations do not block the execution of subsequent operations, making Node.js efficient and suitable for high-performance applications.

Node.js runs on the V8 JavaScript engine, the same engine used in Google Chrome, which compiles JavaScript directly to native machine code for fast execution.

Some common uses of NodeJS include:

  • Web apps - particularly real-time apps like chat apps, online gaming and collaboration tools
  • API development - ideal for building both [[REST APIs]] and [[GraphQL]] APIs
  • Streaming services - its asynchronous nature makes it suitable for streaming data-intensive apps
  • Microservices architecture - often used in microservice architectures due to its lightweight and modular structure