What is Node.js?
Node.js, or Node for short, is an open-source, server-side JavaScript runtime environment. You can use Node.js to run JavaScript applications and code in many places outside of a browser, such as on a server or in a CI/CD pipeline.
Node.js is a wrapper around a JavaScript engine called V8 that powers many browsers, including Google Chrome, Opera, Safari, Microsoft Edge, Firefox and much more. You can use Node.js to run JavaScript by using the V8 engine outside of a browser. Node.js APIS provide access to many systems you might need to use such as HTTP, OS, Path, File system, Crypto, and Worker threads. These APIs make Node.js a good choice for building a web server.
As a new member of TailWind Trader's, perhaps you've never used JavaScript as a primary programming language. It might be the right choice for writing robust, modular applications because JavaScript also offers some unique advantages. For example, because browsers use JavaScript, you can use Node.js to share logic like form-validation rules between the browser and the server.
JavaScript has become more relevant with the rise of single-page applications (SPAs) and supports the widely used JavaScript Object Notation (JSON) data-exchange format. Many database technologies, including SQL and no-SQL, use JavaScript and JSON as a format for queries and schemas.
SQL databases which use JavaScript JSON objects include:
NoSQL databases which use JavaScript JSON objects include:
You can build the following types of applications by using Node.js:
- HTTP web servers
- Microservices or serverless API backends
- Interactive command-line interfaces (CLI)
- Modular code libraries and utilities
- Automation scripts
In the next unit, we'll take a closer look at the Node.js architecture and how it works.