SlideShare a Scribd company logo
2
Most read
5
Most read
12
Most read
Node JS Core Modules
Common JS Modules
• Node.js Core Module
• Node.jsThird-Party Modules
• Node.js File Modules
• Node.js Folder Modules
Core Module
• Core module provide most of the basic functionalities of node, including
filesystem access, HTTP and HTTPS interfaces and much more.
• Node.js has a set of built-in modules which you can use without any further
installation.
• To load a core module use require method in JS File.
• var module = require('module_name');
• The require() function will return a JavaScript type depending on what the particular module returns.
Example:
• var fs = require(‘module_name’);
fs.readFile(‘/sample.html’, function(err,data){
if (err){
return console.log(err);
}
Console.log(data);
});
• var http = require('http’);
• http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello World!');
}).listen(8080);
List of Core modules in node
• Node.js Modules
• In Node.js, Modules are the blocks of encapsulated code that communicates with an
external application on the basis of their related functionality. Modules can be a single file
or a collection of multiples files/folders.The reason programmers are heavily reliant on
modules is because of their re-usability as well as the ability to break down a complex piece
of code into manageable chunks.
• Modules are of three types:
• Core Modules
• local Modules
• Third-party Modules.
What is http module and what does it do?
• The Built-in HTTP Module
• Node.js has a built-in module called HTTP, which allows Node.js to transfer data over
the HyperTextTransfer Protocol (HTTP).
• To include the HTTP module, use the require() method:
• var http = require('http');
• Node.js as aWeb Server
• The HTTP module can create an HTTP server that listens to server ports and gives a
response back to the client.
• Use the createServer() method to create an HTTP server:
Basic function in http module
Node.js HTTP Module
var http = require('http');
Initiate demo_http.js: C:UsersYour Name>node demo_http.js.
demo_http_url.js. var http = require('http'); http. createServer(function (req,
res) { res. writeHead(200, {'Content-Type': 'text/html'}); res. ...
Initiate demo_http_url.js: C:UsersYour Name>node demo_http_url.js.
asic function in http module
basic function in fs module
• Node.js as a File Server
• The Node.js file system module allows you to work with the file system on your computer.
• To include the File System module, use the require() method:
• var fs = require('fs');
• Common use for the File System module:
• Read files
• Create files
• Update files
• Delete files
• Rename files
• Read Files
• The fs.readFile() method is used to read files on your computer.
What is os module and what does it do?
The os module is a built-in Nodejs module that is used to get information about a computer’s operating system. In other words, the os module
provides operating system-related utility methods and properties.
Syntax
const os = require('os');
Now, let’s take a look at some properties and methods of the os module.
os.type()
os.type() method returns the name of the operating system of the computer.
1
const os = require("os");
2
3
console.log(os.type())
basic function in os module

More Related Content

PPTX
Node.js web-based Example :Run a local server in order to start using node.js...
Kongu Engineering College, Perundurai, Erode
 
PPT
nodejs_at_a_glance.ppt
WalaSidhom1
 
PPT
nodejs_at_a_glance, understanding java script
mohammedarshadhussai4
 
PPTX
Node.js: The What, The How and The When
FITC
 
PDF
5.node js
Geunhyung Kim
 
PDF
Introduction to Node.js: What, why and how?
Christian Joudrey
 
PPTX
Event Handling -_GET _ POSTimplementation.pptx
Kongu Engineering College, Perundurai, Erode
 
Node.js web-based Example :Run a local server in order to start using node.js...
Kongu Engineering College, Perundurai, Erode
 
nodejs_at_a_glance.ppt
WalaSidhom1
 
nodejs_at_a_glance, understanding java script
mohammedarshadhussai4
 
Node.js: The What, The How and The When
FITC
 
5.node js
Geunhyung Kim
 
Introduction to Node.js: What, why and how?
Christian Joudrey
 
Event Handling -_GET _ POSTimplementation.pptx
Kongu Engineering College, Perundurai, Erode
 

Similar to Node JS Core Module PowerPoint Presentation (20)

PPT
nodejs tutorial foor free download from academia
rani marri
 
KEY
Node.js
Ian Oxley
 
DOCX
Node js getting started
Pallavi Srivastava
 
PPTX
Introduction to node.js
Adrien Guéret
 
PDF
Introduction to Node.js
Richard Lee
 
PPTX
Introducing Node.js in an Oracle technology environment (including hands-on)
Lucas Jellema
 
PPTX
Scalable network applications, event-driven - Node JS
Cosmin Mereuta
 
PPTX
Java script at backend nodejs
Amit Thakkar
 
PPTX
Introduction to node.js GDD
Sudar Muthu
 
PPTX
Introduction to Node (15th May 2017)
Lucas Jellema
 
PPTX
Requiring your own files.pptx
Lovely Professional University
 
PPTX
Packing for the Web with Webpack
Thiago Temple
 
PDF
Codeigniter
Joram Salinas
 
PDF
An Introduction to Tornado
Gavin Roy
 
PPTX
Node.js Workshop - Sela SDP 2015
Nir Noy
 
ODP
Groovy & Grails eXchange 2012 vert.x presentation
Stuart (Pid) Williams
 
PPTX
Intro to node and mongodb 1
Mohammad Qureshi
 
PPTX
Express js
Manav Prasad
 
PPTX
node_js.pptx
dipen55
 
nodejs tutorial foor free download from academia
rani marri
 
Node.js
Ian Oxley
 
Node js getting started
Pallavi Srivastava
 
Introduction to node.js
Adrien Guéret
 
Introduction to Node.js
Richard Lee
 
Introducing Node.js in an Oracle technology environment (including hands-on)
Lucas Jellema
 
Scalable network applications, event-driven - Node JS
Cosmin Mereuta
 
Java script at backend nodejs
Amit Thakkar
 
Introduction to node.js GDD
Sudar Muthu
 
Introduction to Node (15th May 2017)
Lucas Jellema
 
Requiring your own files.pptx
Lovely Professional University
 
Packing for the Web with Webpack
Thiago Temple
 
Codeigniter
Joram Salinas
 
An Introduction to Tornado
Gavin Roy
 
Node.js Workshop - Sela SDP 2015
Nir Noy
 
Groovy & Grails eXchange 2012 vert.x presentation
Stuart (Pid) Williams
 
Intro to node and mongodb 1
Mohammad Qureshi
 
Express js
Manav Prasad
 
node_js.pptx
dipen55
 
Ad

Recently uploaded (20)

PDF
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
PPTX
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PPTX
TestNG for Java Testing and Automation testing
ssuser0213cb
 
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PPTX
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
PDF
Solar Panel Installation Guide – Step By Step Process 2025.pdf
CRMLeaf
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Wondershare Filmora 14.5.20.12999 Crack Full New Version 2025
gsgssg2211
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
PPTX
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
oapresentation.pptx
mehatdhavalrajubhai
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
TestNG for Java Testing and Automation testing
ssuser0213cb
 
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
Activate_Methodology_Summary presentatio
annapureddyn
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
Solar Panel Installation Guide – Step By Step Process 2025.pdf
CRMLeaf
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Wondershare Filmora 14.5.20.12999 Crack Full New Version 2025
gsgssg2211
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
Presentation about variables and constant.pptx
kr2589474
 
Ad

Node JS Core Module PowerPoint Presentation

  • 1. Node JS Core Modules
  • 2. Common JS Modules • Node.js Core Module • Node.jsThird-Party Modules • Node.js File Modules • Node.js Folder Modules
  • 3. Core Module • Core module provide most of the basic functionalities of node, including filesystem access, HTTP and HTTPS interfaces and much more. • Node.js has a set of built-in modules which you can use without any further installation. • To load a core module use require method in JS File. • var module = require('module_name'); • The require() function will return a JavaScript type depending on what the particular module returns.
  • 4. Example: • var fs = require(‘module_name’); fs.readFile(‘/sample.html’, function(err,data){ if (err){ return console.log(err); } Console.log(data); });
  • 5. • var http = require('http’); • http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end('Hello World!'); }).listen(8080);
  • 6. List of Core modules in node • Node.js Modules • In Node.js, Modules are the blocks of encapsulated code that communicates with an external application on the basis of their related functionality. Modules can be a single file or a collection of multiples files/folders.The reason programmers are heavily reliant on modules is because of their re-usability as well as the ability to break down a complex piece of code into manageable chunks. • Modules are of three types: • Core Modules • local Modules • Third-party Modules.
  • 7. What is http module and what does it do? • The Built-in HTTP Module • Node.js has a built-in module called HTTP, which allows Node.js to transfer data over the HyperTextTransfer Protocol (HTTP). • To include the HTTP module, use the require() method: • var http = require('http'); • Node.js as aWeb Server • The HTTP module can create an HTTP server that listens to server ports and gives a response back to the client. • Use the createServer() method to create an HTTP server:
  • 8. Basic function in http module Node.js HTTP Module var http = require('http'); Initiate demo_http.js: C:UsersYour Name>node demo_http.js. demo_http_url.js. var http = require('http'); http. createServer(function (req, res) { res. writeHead(200, {'Content-Type': 'text/html'}); res. ... Initiate demo_http_url.js: C:UsersYour Name>node demo_http_url.js.
  • 9. asic function in http module
  • 10. basic function in fs module • Node.js as a File Server • The Node.js file system module allows you to work with the file system on your computer. • To include the File System module, use the require() method: • var fs = require('fs'); • Common use for the File System module: • Read files • Create files • Update files • Delete files • Rename files • Read Files • The fs.readFile() method is used to read files on your computer.
  • 11. What is os module and what does it do? The os module is a built-in Nodejs module that is used to get information about a computer’s operating system. In other words, the os module provides operating system-related utility methods and properties. Syntax const os = require('os'); Now, let’s take a look at some properties and methods of the os module. os.type() os.type() method returns the name of the operating system of the computer. 1 const os = require("os"); 2 3 console.log(os.type())
  • 12. basic function in os module