Node JS Introduction
Node.js is an open-source, server-side JavaScript runtime environment built on the V8 JavaScript engine. It allows developers to execute JavaScript code on the server-side, outside of a web browser.
A Node.js app runs in a single process, without creating a new thread for every request. Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking and generally, libraries in Node.js are written using non-blocking paradigms, making blocking behavior the exception rather than the norm.
When Node.js performs an I/O operation, like reading from the network, accessing a database or the filesystem, instead of blocking the thread and wasting CPU cycles waiting, Node.js will resume the operations when the response comes back.
This allows Node.js to handle thousands of concurrent connections with a single server without introducing the burden of managing thread concurrency, which could be a significant source of bugs.
Now, install node js on your machine/desktop/laptop
- Visit the official Node.js website: https://nodejs.org
- On the Node.js website, you'll see two versions available: LTS (Long-Term Support) and Current. It's recommended to choose the LTS version for stability unless you have specific reasons to use the Current version.
- Click on the LTS download button to download the Node.js installer for your operating system. Node.js is available for Windows, macOS, and Linux.
- Once the installer is downloaded, run it on your computer. The installation process may vary slightly depending on your operating system.
- After the installation is complete, you can verify that Node.js is installed by opening a terminal or command prompt and running the following command: node -v
Comments
Post a Comment