SlideShare a Scribd company logo
NODE.JS
Day ­ 1
Soni Pandey
Software Developer
Download the Node.js for your operating system and 
install. 
https://nodejs.org/download/
Installation
Welcome ApplicationFirst, we will console text “Welcome !!”. We will make welcome.js 
file.  Welcome.js
console.log(“Welcome !!”);
Now, run the node welcome.js on command line/terminal (command 
line/terminal should navigate that folder which contains welcome.js file).
You will see “welcome!!” on console.
Wow, you made one application in node.js. Now we will move to advance 
version of node.js, where we will make http server and we will see this 
text(“welcome!!”) in browser.
HTTP Server Web Application
var http = require("http"); 
http.createServer(function (req, res) { 
    console.log(“Your application is running on localhost:9000”);
    req.on("end", function () { 
    res.writeHead(200, { 'Content­Type': 'text/plain' });
    res.end(‘Welcome!!'); 
}).listen(9000);
Now, run the node welcome.js on command line/terminal 
(command line/terminal should navigate that folder which contains 
welcome.js file). This time, you will see in console “Your application 
is running on localhost:9000”. When you will open your browser on 
localhost:9000, you will see “welcome!!” on your screen.
var http = require("http"); 
First, we included http module as dependency.
http.createServer();
This function will create the server. Function passed two parameters.
req variable holds all request parameter.
res variable holds all response send to server.
res.writeHead(200, { 'Content­Type': 'text/plain' });
writeHead function is used to write headers to the response. 
200 is HTTP status code (this one means success)
Second parameter holds header fields in object.
Here, we are sending plain text, so Content­Type should be text/plain.
We created our server and now will make it to listen at port 9000 like this:
listen(9000);
This is just start to Node.js Application, We will get back to you
soon with more interesting slides.
Thank You

More Related Content

PDF
Node intro
Vishal Sharma
 
PPTX
Starting with Node.js
Jitendra Zaa
 
PDF
Node.js introduction
Parth Joshi
 
PPTX
Introduction to node
girish82
 
PDF
Server Side Apocalypse, JS
Md. Sohel Rana
 
PPTX
Introduction to node.js
Md. Sohel Rana
 
ODP
Ez Content Staging for the rest of us
Gaetano Giunta
 
PPTX
Introduction to node
Justin Woo
 
Node intro
Vishal Sharma
 
Starting with Node.js
Jitendra Zaa
 
Node.js introduction
Parth Joshi
 
Introduction to node
girish82
 
Server Side Apocalypse, JS
Md. Sohel Rana
 
Introduction to node.js
Md. Sohel Rana
 
Ez Content Staging for the rest of us
Gaetano Giunta
 
Introduction to node
Justin Woo
 

What's hot (20)

KEY
Going real time with Socket.io
Arnout Kazemier
 
PDF
MongoDB + Node.JS + EPAM ROAD
Szilveszter Molnár
 
PDF
Asynchronous JavaScript loading
yay w00t
 
PDF
Socket.IO
Davide Pedranz
 
DOCX
Node js getting started
Pallavi Srivastava
 
PPTX
What is Node.js
mohamed hadrich
 
PDF
Create a RESTful API with NodeJS, Express and MongoDB
Hengki Sihombing
 
PDF
Going realtime with Socket.IO
Christian Joudrey
 
PPT
Node js Modules and Event Emitters
TheCreativedev Blog
 
KEY
Refactoring.the.ruby.way
Shouichi KAMIYA
 
PDF
Drupal + selenium
hernanibf
 
KEY
Getting Started with HTML 5 Web workers
Flumes
 
PPTX
Maurizio Mangione - What Service Workers can do - Codemotion Milan 2017
Codemotion
 
PDF
110623 ra how to map network drive
Roger Amedikou
 
PDF
JavaScript Web Workers
Tobias Pfeiffer
 
KEY
Socket.io
Timothy Fitz
 
PDF
Web Workers
IntexSoft
 
PDF
ServiceWorker: New game changer is coming!
Chang W. Doh
 
PDF
Node.jsやってみた
Yoshihiko Uchida
 
PDF
MongoDB, Node.js And You: PART II
Mitch Pirtle
 
Going real time with Socket.io
Arnout Kazemier
 
MongoDB + Node.JS + EPAM ROAD
Szilveszter Molnár
 
Asynchronous JavaScript loading
yay w00t
 
Socket.IO
Davide Pedranz
 
Node js getting started
Pallavi Srivastava
 
What is Node.js
mohamed hadrich
 
Create a RESTful API with NodeJS, Express and MongoDB
Hengki Sihombing
 
Going realtime with Socket.IO
Christian Joudrey
 
Node js Modules and Event Emitters
TheCreativedev Blog
 
Refactoring.the.ruby.way
Shouichi KAMIYA
 
Drupal + selenium
hernanibf
 
Getting Started with HTML 5 Web workers
Flumes
 
Maurizio Mangione - What Service Workers can do - Codemotion Milan 2017
Codemotion
 
110623 ra how to map network drive
Roger Amedikou
 
JavaScript Web Workers
Tobias Pfeiffer
 
Socket.io
Timothy Fitz
 
Web Workers
IntexSoft
 
ServiceWorker: New game changer is coming!
Chang W. Doh
 
Node.jsやってみた
Yoshihiko Uchida
 
MongoDB, Node.js And You: PART II
Mitch Pirtle
 
Ad

Viewers also liked (19)

DOC
China organosilicon industry market demand prospects and investment strategy ...
Qianzhan Intelligence
 
PDF
China pharmaceutical excipients industry indepth research and investment stra...
Qianzhan Intelligence
 
DOC
China cardiovascular system drugs industry market demand forecast and investm...
Qianzhan Intelligence
 
DOC
China coated abrasives industry market research and investment forecast report
Qianzhan Intelligence
 
PDF
China accounting firm indepth research and investment strategic planning repo...
Qianzhan Intelligence
 
DOC
China automated warehouse industry investment demand and development prospect...
Qianzhan Intelligence
 
PDF
China banking industry market research and prospect forecast report
Qianzhan Intelligence
 
DOC
China engineering consultation industry development prospects and investment ...
Qianzhan Intelligence
 
DOC
China organosilicon industry market demand prospects and investment strategy ...
Qianzhan Intelligence
 
PDF
Forex Basics
ayman diab
 
DOC
China pharmaceutical excipients industry indepth research and investment stra...
Qianzhan Intelligence
 
DOC
China dredging engineering industry development prospect and investment strat...
Qianzhan Intelligence
 
PPTX
Ostern in finnland atte 8 m (2)
Eine kleine Deutschkiste
 
DOC
China food safety testing industry development prospects and investment oppor...
Qianzhan Intelligence
 
DOC
China engineering consultation industry development prospects and investment ...
Qianzhan Intelligence
 
ODP
презентация литература
CDO3
 
PDF
China organosilicon industry market demand prospects and investment strategy ...
Qianzhan Intelligence
 
PDF
China cardiovascular system drugs industry market demand forecast and investm...
Qianzhan Intelligence
 
TXT
지리산콘도//BU797。СΟΜ//알래스카크루즈
hjsoidjgo
 
China organosilicon industry market demand prospects and investment strategy ...
Qianzhan Intelligence
 
China pharmaceutical excipients industry indepth research and investment stra...
Qianzhan Intelligence
 
China cardiovascular system drugs industry market demand forecast and investm...
Qianzhan Intelligence
 
China coated abrasives industry market research and investment forecast report
Qianzhan Intelligence
 
China accounting firm indepth research and investment strategic planning repo...
Qianzhan Intelligence
 
China automated warehouse industry investment demand and development prospect...
Qianzhan Intelligence
 
China banking industry market research and prospect forecast report
Qianzhan Intelligence
 
China engineering consultation industry development prospects and investment ...
Qianzhan Intelligence
 
China organosilicon industry market demand prospects and investment strategy ...
Qianzhan Intelligence
 
Forex Basics
ayman diab
 
China pharmaceutical excipients industry indepth research and investment stra...
Qianzhan Intelligence
 
China dredging engineering industry development prospect and investment strat...
Qianzhan Intelligence
 
Ostern in finnland atte 8 m (2)
Eine kleine Deutschkiste
 
China food safety testing industry development prospects and investment oppor...
Qianzhan Intelligence
 
China engineering consultation industry development prospects and investment ...
Qianzhan Intelligence
 
презентация литература
CDO3
 
China organosilicon industry market demand prospects and investment strategy ...
Qianzhan Intelligence
 
China cardiovascular system drugs industry market demand forecast and investm...
Qianzhan Intelligence
 
지리산콘도//BU797。СΟΜ//알래스카크루즈
hjsoidjgo
 
Ad

Similar to Node.js first slide (20)

PDF
5.node js
Geunhyung Kim
 
PPTX
Node.js web-based Example :Run a local server in order to start using node.js...
Kongu Engineering College, Perundurai, Erode
 
PPTX
node.js workshop- node.js basics
Qiong Wu
 
PDF
Introduction to Node.js
Somkiat Puisungnoen
 
PPTX
node_js.pptx
dipen55
 
PDF
SocketStream
Paul Jensen
 
PPTX
Intsllation & 1st program nodejs
monikadeshmane
 
ODP
node.js - Fast event based web application development
openForce Information Technology GesmbH
 
PDF
Introduction to Node js for beginners + game project
Laurence Svekis ✔
 
PDF
Node.js - async for the rest of us.
Mike Brevoort
 
KEY
A language for the Internet: Why JavaScript and Node.js is right for Internet...
Tom Croucher
 
KEY
Writing robust Node.js applications
Tom Croucher
 
PDF
Intro to node.js - Ran Mizrahi (28/8/14)
Ran Mizrahi
 
PDF
Intro to node.js - Ran Mizrahi (27/8/2014)
Ran Mizrahi
 
PDF
Ruby MVC from scratch with Rack
DonSchado
 
PDF
What is Node.js? (ICON UK)
Tim Davis
 
PPTX
Nodejs
dssprakash
 
PPTX
Introduction to Node.js
Vikash Singh
 
PPTX
Java script at backend nodejs
Amit Thakkar
 
5.node js
Geunhyung Kim
 
Node.js web-based Example :Run a local server in order to start using node.js...
Kongu Engineering College, Perundurai, Erode
 
node.js workshop- node.js basics
Qiong Wu
 
Introduction to Node.js
Somkiat Puisungnoen
 
node_js.pptx
dipen55
 
SocketStream
Paul Jensen
 
Intsllation & 1st program nodejs
monikadeshmane
 
node.js - Fast event based web application development
openForce Information Technology GesmbH
 
Introduction to Node js for beginners + game project
Laurence Svekis ✔
 
Node.js - async for the rest of us.
Mike Brevoort
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
Tom Croucher
 
Writing robust Node.js applications
Tom Croucher
 
Intro to node.js - Ran Mizrahi (28/8/14)
Ran Mizrahi
 
Intro to node.js - Ran Mizrahi (27/8/2014)
Ran Mizrahi
 
Ruby MVC from scratch with Rack
DonSchado
 
What is Node.js? (ICON UK)
Tim Davis
 
Nodejs
dssprakash
 
Introduction to Node.js
Vikash Singh
 
Java script at backend nodejs
Amit Thakkar
 

Recently uploaded (20)

PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Doc9.....................................
SofiaCollazos
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Doc9.....................................
SofiaCollazos
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 

Node.js first slide