Node.js Archives - Netzole https://www.netzole.org/category/node-js/ Wed, 28 May 2025 17:38:31 +0000 en-US hourly 1 Node.js Modules https://www.netzole.org/node-js-modules/ https://www.netzole.org/node-js-modules/#respond Tue, 28 Jan 2025 16:34:58 +0000 https://www.netzole.org/?p=25 In Simple Words, Node.js Modules are JavaScript files which contains different functionalities in each separate files. Modules are very useful to organise the code which...

The post Node.js Modules appeared first on Netzole.

]]>
In Simple Words, Node.js Modules are JavaScript files which contains different functionalities in each separate files. Modules are very useful to organise the code which makes debugging or future editing very easy. Node.js comes with various very useful Inbuilt modules which can be used for creating different functionalities.

Node.js Inbuilt Modules

Node.js inbuilt modules are lightweight and inbuilt with Node.js installations. You can use these Node.js Inbuilt Modules in your app without any installation.
Here is a list of the built-in modules of Node.js version 6.10.3:
assert :  Provides a set of assertion tests
buffer : To handle binary data
child_process : To run a child process
cluster : To split a single Node process into multiple processes
crypto : To handle OpenSSL cryptographic functions
dgram : Provides implementation of UDP datagram sockets
dns : To do DNS lookups and name resolution functions
events : To handle events
fs : To handle the file system
http : To make Node.js act as an HTTP server
https : To make Node.js act as an HTTPS server.
net : To create servers and clients
os : Provides information about the operation system
path : To handle file paths
querystring : To handle URL query strings
readline : To handle readable streams one line at the time
stream : To handle streaming data
string_decoder : To decode buffer objects into strings
timers : To execute a function after a given number of milliseconds
tls : To implement TLS and SSL protocols
tty : Provides classes used by a text terminal
url : To parse URL strings
util : To access utility functions
v8 : To access information about V8 (the JavaScript engine)
vm : To compile JavaScript code in a virtual machine
zlib : To compress or decompress files

How to include Node.js Module into the app:

We can include any of above module by using the require() function. for example:

var http = require('http');

We can include any of above module by this method we just need to change module name in place of http.

This is the full code to use http module to create http server

var http = require('http');

http.createServer(function (req, res) {
   res.writeHead(200, {'Content-Type': 'text/html'});
   res.end('Hello World!');
}).listen(8080);

In Next Tutorial we will learn how to create custom module at Node.js

The post Node.js Modules appeared first on Netzole.

]]> https://www.netzole.org/node-js-modules/feed/ 0 Nodejs Tutorial https://www.netzole.org/nodejs-tutorial/ https://www.netzole.org/nodejs-tutorial/#respond Tue, 28 Jan 2025 12:56:02 +0000 https://www.netzole.org/?p=23 Introduction to Node.js Node.js commonly used to run various build tools designed to automate the process of developing a modern JavaScript application. Node.js is an...

The post Nodejs Tutorial appeared first on Netzole.

]]>
Introduction to Node.js

Node.js commonly used to run various build tools designed to automate the process of developing a modern JavaScript application. Node.js is an fast and highly scalable open-source server side runtime environment built on Chrome’s V8 JavaScript engine. Node.js allows you to run JavaScript on the server. These Node.js tutorial provides basic and advanced concepts of Node.js and helps to beginners and professionals both to step by step learn node.js in easy and fast way.

Node.js runs single-threaded, non-blocking, asynchronously programming, which is very memory efficient. Node.js is particularly suited to building applications that require some form of real-time interaction or collaboration. It’s also a good fit for building APIs where you’re handling lots of requests that are I/O driven.

What Can Node.js Do?

Node.js can generate dynamic page content and can create, open, read, write, delete, and close files on the server. Node.js can collect form data and can add, delete, modify data in your database.

Prerequisites for learn node.js

You should have basic knowledge of html, css and javascript.

The post Nodejs Tutorial appeared first on Netzole.

]]>
https://www.netzole.org/nodejs-tutorial/feed/ 0
How to Download & Install Node.js – Step by Step Guide https://www.netzole.org/how-to-download-install-node-js-step-by-step-guide/ https://www.netzole.org/how-to-download-install-node-js-step-by-step-guide/#respond Tue, 28 Jan 2025 12:52:09 +0000 https://www.netzole.org/?p=21 In this Node.js tutorial we will learn step by step how to download Node.js and install Nodejs on different environment like Windows, Linux, Macos and...

The post How to Download & Install Node.js – Step by Step Guide appeared first on Netzole.

]]>
In this Node.js tutorial we will learn step by step how to download Node.js and install Nodejs on different environment like Windows, Linux, Macos and server.

Download node.js

You can download latest stable version of node.js from the node.js official website https://nodejs.org/en/
Once you open the website it will detect your operating system automatically and show you the correct version for your device. For example we opened the site from 64 bit Windows system so there is 64 bit node.js package available for download. If you are from 32 bit Windows or linux or Macos it will display version respectively. You can also download the other versions from the download page https://nodejs.org/en/download/
Download node.js

Install Node.js on Windows

In order to install Node.js on Windows you have to perform following actions:
Step 1 : Download the Node.js Windows Installer Package from the Node.js official website as per above.

Step 2 : After downloading the Node.js Windows Installer package, double click  on the downloaded msi file. Now installation process has started and you will see below screen.
Install Nodejs on Windows

Step 3 : Click on Next button, On the Next screen, Accept the terms in the license agreement and click on the Next button.
install Nodejs on Windows steps

Step 4 : On Next screen, choose the location where Node.js needs to be installed if want to install new location otherwise leave default location and then click on the Next button.
Install nodejs on windows steps

Step 5: Accept the default components as per below screenshot and click on the Next button. You don’t need to change anything at here.
Install Nodejs Windows

Step 6 : Now Nodejs is ready to install at your system. Click on the Install Button
Install nodejs windows

After clicking on the Next button, Node.js started to install at your system please keep waiting for finish installation

Install nodejs on windows step 7

Step 8 : Once Installation is done. Click on the finish button. Now Node.js is installed at your system successfully and ready to use for creating node.js applications.
Install Node.js on Windows last step

How to verify Installation

You can verify the installation or check the version of nodejs by the following steps. First open the command prompt at your desktop and type the command node -v  . If nodejs installed at your machine you will see the version of nodejs as per the below image:
verify nodejs install

Now we learn at next article, How to install nodejs at linux or ubuntu.

The post How to Download & Install Node.js – Step by Step Guide appeared first on Netzole.

]]>
https://www.netzole.org/how-to-download-install-node-js-step-by-step-guide/feed/ 0