Introduction:
Node.js is a cross-platform, runtime environment, and library for running JavaScript applications outside the browser. It is used for creating server-side and networking web applications. It is open-source and free to use. Many of the basic modules of Node.js are written in JavaScript. Node.js is mostly used to run real-time server applications.
The definition given by its official documentation is as follows:
?Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.?
What is Node.js?
- Node.js is an open-source server environment
- Node.js is free
- Node.js runs on various platforms(Windows, Linux, Unix, Mac OS X, etc.)
- Node.js uses JavaScript on the server
Why Node.js?
Here is how PHP or ASP handles a file request:
- Sends the task to the computer's file system.
- Waits while the file system opens and reads the file.
- Returns the content to the client.
- ready to handle the next request.
Here is how Node.js handles a file request:
- Sends the task to the computer's file system.
- Ready to handle the next request.
- When the file system has opened and read the file, the server returns the content to the client.
Node.js eliminates the waiting, and simply, and continues with the next request.
Node.js runs single-threaded, non-blocking, asynchronously programming, which is very memory efficient.
What can Node.js Do?
- Node.js can generate the dynamic page content
- Node.js can create, open, read, write, delete, and close files on the server
- Node.js can collect form data
- Node.js can add, delete, modify data in your database.
What is a Node.js File?
- Node.js files contain tasks that will be executed on certain events.
- A typical event is someone trying to access a port on the server.
- Node.js files must be initiated on the server before having any effect.
- Node.js files have extension ".js"
Different parts of Node.js:
- Buffer
- Streaming
- DNS
- Domain
- Global
- Net
- Error Handling Crypto
- Callback
- Add-ons
- Cluster
- Console
- Debugger
- Modules
Features of Node.js:
- Extremely fast: Node.js is built on Google Chromes's V8 JavaScript Engine, so its library is very fast in code execution.
- Highly Scalable: Node.js is highly scalable because the event mechanism helps the server to respond in a non-blocking way.
- Open source: Node.js has an open-source community that has produced many excellent modules to add additional capabilities to Node.js applications.
- Single-threaded: Node.js follows a single-threaded model with event looping.
- License: Node.js is released under the MIT license.
- No buffering: Node.js cuts down the overall processing time while uploading audio and video files. Node.js applications never buffer any data. These applications simply output the data in chunks.
Install Node.js on Windows:
To install and set up an environment for Node.js, you need the following two software available on your computer:
- Text Editor
- Node.js Binary installable
How to download Node.js:
You can download the latest version of Node.js installable archive file from https://nodejs.org/en/

Here, you deploy the installation of node-v$.4.2 LTS is recommended for most users.


Accept the terms of the license agreement.

Choose the location where you want to install it.

Ready to install:




Hope this found you interesting and helpful and stay tuned for more articles.
Thank You.
~Jinal Menpara
Good work๐
ReplyDeleteThanks
DeleteGreat๐๐ป
ReplyDeleteGreat work
ReplyDeleteNice job ๐
ReplyDeletegreat work
ReplyDeleteVery good
ReplyDelete