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
PPTX
Starting with Node.js
PDF
Node.js introduction
PPTX
Introduction to node
PDF
Server Side Apocalypse, JS
PPTX
Introduction to node.js
ODP
Ez Content Staging for the rest of us
PPTX
Introduction to node
Node intro
Starting with Node.js
Node.js introduction
Introduction to node
Server Side Apocalypse, JS
Introduction to node.js
Ez Content Staging for the rest of us
Introduction to node

What's hot (20)

KEY
Going real time with Socket.io
PDF
MongoDB + Node.JS + EPAM ROAD
PDF
Asynchronous JavaScript loading
PDF
Socket.IO
DOCX
Node js getting started
PPTX
What is Node.js
PDF
Create a RESTful API with NodeJS, Express and MongoDB
PDF
Going realtime with Socket.IO
PPT
Node js Modules and Event Emitters
KEY
Refactoring.the.ruby.way
PDF
Drupal + selenium
KEY
Getting Started with HTML 5 Web workers
PPTX
Maurizio Mangione - What Service Workers can do - Codemotion Milan 2017
PDF
110623 ra how to map network drive
PDF
JavaScript Web Workers
KEY
Socket.io
PDF
Web Workers
PDF
ServiceWorker: New game changer is coming!
PDF
Node.jsやってみた
PDF
MongoDB, Node.js And You: PART II
Going real time with Socket.io
MongoDB + Node.JS + EPAM ROAD
Asynchronous JavaScript loading
Socket.IO
Node js getting started
What is Node.js
Create a RESTful API with NodeJS, Express and MongoDB
Going realtime with Socket.IO
Node js Modules and Event Emitters
Refactoring.the.ruby.way
Drupal + selenium
Getting Started with HTML 5 Web workers
Maurizio Mangione - What Service Workers can do - Codemotion Milan 2017
110623 ra how to map network drive
JavaScript Web Workers
Socket.io
Web Workers
ServiceWorker: New game changer is coming!
Node.jsやってみた
MongoDB, Node.js And You: PART II
Ad

Viewers also liked (19)

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

Similar to Node.js first slide (20)

PDF
introduction to node js kndoendenendjndj
PDF
5.node js
PPTX
Node.js web-based Example :Run a local server in order to start using node.js...
PPTX
node.js workshop- node.js basics
PDF
Introduction to Node.js
PPTX
node_js.pptx
PDF
SocketStream
PPTX
Intsllation & 1st program nodejs
ODP
node.js - Fast event based web application development
PDF
Introduction to Node js for beginners + game project
PDF
Node.js - async for the rest of us.
KEY
A language for the Internet: Why JavaScript and Node.js is right for Internet...
KEY
Writing robust Node.js applications
PDF
Intro to node.js - Ran Mizrahi (28/8/14)
PDF
Intro to node.js - Ran Mizrahi (27/8/2014)
PDF
Ruby MVC from scratch with Rack
PDF
What is Node.js? (ICON UK)
PPTX
Nodejs
PPTX
Introduction to Node.js
introduction to node js kndoendenendjndj
5.node js
Node.js web-based Example :Run a local server in order to start using node.js...
node.js workshop- node.js basics
Introduction to Node.js
node_js.pptx
SocketStream
Intsllation & 1st program nodejs
node.js - Fast event based web application development
Introduction to Node js for beginners + game project
Node.js - async for the rest of us.
A language for the Internet: Why JavaScript and Node.js is right for Internet...
Writing robust Node.js applications
Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (27/8/2014)
Ruby MVC from scratch with Rack
What is Node.js? (ICON UK)
Nodejs
Introduction to Node.js

Recently uploaded (20)

PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
DOCX
search engine optimization ppt fir known well about this
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
UiPath Agentic Automation session 1: RPA to Agents
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
2018-HIPAA-Renewal-Training for executives
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
The various Industrial Revolutions .pptx
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPT
What is a Computer? Input Devices /output devices
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Architecture types and enterprise applications.pdf
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
search engine optimization ppt fir known well about this
Custom Battery Pack Design Considerations for Performance and Safety
UiPath Agentic Automation session 1: RPA to Agents
Module 1.ppt Iot fundamentals and Architecture
The influence of sentiment analysis in enhancing early warning system model f...
Hindi spoken digit analysis for native and non-native speakers
2018-HIPAA-Renewal-Training for executives
Enhancing emotion recognition model for a student engagement use case through...
Chapter 5: Probability Theory and Statistics
Abstractive summarization using multilingual text-to-text transfer transforme...
Consumable AI The What, Why & How for Small Teams.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
The various Industrial Revolutions .pptx
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
What is a Computer? Input Devices /output devices
sustainability-14-14877-v2.pddhzftheheeeee
Getting started with AI Agents and Multi-Agent Systems
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Architecture types and enterprise applications.pdf

Node.js first slide