SlideShare a Scribd company logo
Session III
©Techforce Infotech Pvt Ltd 2017-18
 Express is a fast, assertive, essential and moderate web
framework of Node.js. You can assume express as a layer built
on the top of the Node.js that helps manage a server and routes.
It provides a robust set of features to develop web and mobile
applications.
 It can be used to design single-page, multi-page and hybrid web
applications.
 It allows to setup middle wares to respond to HTTP Requests.
 It defines a routing table which is used to perform different
actions based on HTTP method and URL.
 It allows to dynamically render HTML Pages based on passing
arguments to templates.
 Installing Express:- npm install -g express
Express.js
 Makes Node.js web application development fast and
easy.
 Easy to configure and customize.
 Node comes with support for low-overhead HTTP
servers.
 Creating web applications using ‘http’ is a long
process.
 Using express will give some added benefits.
 Allows you to create REST API server.
 Easy to integrate with different template engines like
Jade, Vash, EJS etc.
 Allows you to create REST API server.
Why use Express ?
 Routing based on URL paths.
 Managing sessions via cookies.
 Parsing incoming request like form data or JSON.
 Rejecting malformed requests.
Features of Express
Reques
t
Respon
se
GET
Express.js Objects
Express.js
Objects
Request Response
Routing
GET
POST
Cookies
File
Upload
 Request :- Express.js Request objects is the parameters of the call-back
function which is used in Express applications. The express.js request
object represents the HTTP request and has properties for the request
query string, parameters, body, HTTP headers, and so on.
ex:- req.accepts('html');
 Response :- The Response object (res) specifies the HTTP response
which is sent by an Express app when it gets an HTTP request.
 It sends response back to the client browser.
 It facilitates you to put new cookies value and that will write to the client
browser (under cross domain rule).
 Once you res.send() or res.redirect() or res.render(), you cannot do it again,
otherwise, there will be uncaught error.
 Ex: - res.send({ message: 'hey' });
Express.js Objects
 GET and POST Request :- GET and POST both are two common
HTTP requests used for building REST API's. GET requests are
used to send only limited amount of data because data is sent
into header while POST requests are used to send large amount
of data because data is sent in the body.
 Express.js facilitates you to handle GET and POST requests using the
instance of express.
 Cookie :- Cookies are small piece of information.
 Ex :- var express = require('express');
var parser = require(“cookie-parser”);
 File Upload :- In Express.js, file upload is slightly difficult
because of its asynchronous nature and networking approach.
 It can be done by using middleware to handle multipart/form
data. There are many middleware that can be used like multer,
connect, body-parser etc.
Express.js Objects
 Routing :- Routing is made from the word route. It is used to
determine the specific behaviour of an application. It specifies
how an application responds to a client request to a particular
route, URI or path and a specific HTTP request method (GET,
POST, etc.). It can handle different types of HTTP.
 Ex:-
Express.js Objects
app.delete('/del_student', function (req, res) {
console.log("Got a DELETE request for /del_student");
res.send('Record Deleted!');
})
Session III completed
Address: 403, Venus Benecia, Bodakdev,Ahmedabad –
380053
Reach us : reach@techforceinfotech.com
Contact no: +91 (79) 48904529

More Related Content

PPT
Web servers (l6)
PPT
Web server
PPTX
What is Server? (Web Server vs Application Server)
PPT
Web servers
PPSX
Web server
PPTX
SOAP vs REST
PPT
Web Servers: Architecture and Security
PPTX
Web server
Web servers (l6)
Web server
What is Server? (Web Server vs Application Server)
Web servers
Web server
SOAP vs REST
Web Servers: Architecture and Security
Web server

What's hot (20)

PPTX
Web ,app and db server presentation
PDF
Webservices ingo
PPTX
Rest vs Soap
PPT
Soap vs. rest - which is right web service protocol for your need?
PPT
Soap Vs Rest
PPTX
PPT
Powerpoint Web Admin 2
PDF
Restful web services by Sreeni Inturi
PPTX
Web server hardware and software
PDF
Restful Web Services
PPTX
REST and ASP.NET Web API (Milan)
PPTX
Web Services - A brief overview
PDF
Intro webapps
PPTX
Web services soap and rest by mandakini for TechGig
PPTX
Architecture Best Practices
PPTX
Servlets api overview
PDF
Web Services Tutorial
PPTX
Backend technologies for your startup
PDF
Creating data centric microservices
PPTX
ASP.NET Mvc 4 web api
Web ,app and db server presentation
Webservices ingo
Rest vs Soap
Soap vs. rest - which is right web service protocol for your need?
Soap Vs Rest
Powerpoint Web Admin 2
Restful web services by Sreeni Inturi
Web server hardware and software
Restful Web Services
REST and ASP.NET Web API (Milan)
Web Services - A brief overview
Intro webapps
Web services soap and rest by mandakini for TechGig
Architecture Best Practices
Servlets api overview
Web Services Tutorial
Backend technologies for your startup
Creating data centric microservices
ASP.NET Mvc 4 web api
Ad

Similar to Node Session - 3 (20)

PPTX
Node js crash course session 2
PDF
ExpressJS-Introduction.pdf
PPTX
ExpressJS and REST API.pptx
PPTX
Xml web services
PDF
Esc 209 paper_doin
PPT
Mashup
PPTX
ASP.NET WEB API Training
PDF
Bt0083 server side programing
DOCX
Study of http
PDF
Express node js
PPTX
Scalable network applications, event-driven - Node JS
PPT
gofortution
PPT
Node.js Express Framework
PDF
spring Boot Tutorial Part 1(JPA&Hibernate)
PPT
Ajax Using JSP with prototype.js
PPT
nodejs_at_a_glance.ppt
PDF
JavaEE6 my way
PPTX
Seminar report based on Mern stack web technology
PDF
Pinterest like site using REST and Bottle
Node js crash course session 2
ExpressJS-Introduction.pdf
ExpressJS and REST API.pptx
Xml web services
Esc 209 paper_doin
Mashup
ASP.NET WEB API Training
Bt0083 server side programing
Study of http
Express node js
Scalable network applications, event-driven - Node JS
gofortution
Node.js Express Framework
spring Boot Tutorial Part 1(JPA&Hibernate)
Ajax Using JSP with prototype.js
nodejs_at_a_glance.ppt
JavaEE6 my way
Seminar report based on Mern stack web technology
Pinterest like site using REST and Bottle
Ad

More from Bhavin Shah (6)

PPTX
Node Session - 4
PPTX
Node Session - 2
PPTX
Node Session - 1
PDF
What is Penetration & Penetration test ?
PDF
Cyber security
PPT
MVC ppt presentation
Node Session - 4
Node Session - 2
Node Session - 1
What is Penetration & Penetration test ?
Cyber security
MVC ppt presentation

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
Teaching material agriculture food technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Spectroscopy.pptx food analysis technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Advanced methodologies resolving dimensionality complications for autism neur...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Spectral efficient network and resource selection model in 5G networks
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Per capita expenditure prediction using model stacking based on satellite ima...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Teaching material agriculture food technology
MIND Revenue Release Quarter 2 2025 Press Release
Spectroscopy.pptx food analysis technology
The AUB Centre for AI in Media Proposal.docx
Chapter 3 Spatial Domain Image Processing.pdf
Review of recent advances in non-invasive hemoglobin estimation

Node Session - 3

  • 2.  Express is a fast, assertive, essential and moderate web framework of Node.js. You can assume express as a layer built on the top of the Node.js that helps manage a server and routes. It provides a robust set of features to develop web and mobile applications.  It can be used to design single-page, multi-page and hybrid web applications.  It allows to setup middle wares to respond to HTTP Requests.  It defines a routing table which is used to perform different actions based on HTTP method and URL.  It allows to dynamically render HTML Pages based on passing arguments to templates.  Installing Express:- npm install -g express Express.js
  • 3.  Makes Node.js web application development fast and easy.  Easy to configure and customize.  Node comes with support for low-overhead HTTP servers.  Creating web applications using ‘http’ is a long process.  Using express will give some added benefits.  Allows you to create REST API server.  Easy to integrate with different template engines like Jade, Vash, EJS etc.  Allows you to create REST API server. Why use Express ?
  • 4.  Routing based on URL paths.  Managing sessions via cookies.  Parsing incoming request like form data or JSON.  Rejecting malformed requests. Features of Express
  • 6.  Request :- Express.js Request objects is the parameters of the call-back function which is used in Express applications. The express.js request object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on. ex:- req.accepts('html');  Response :- The Response object (res) specifies the HTTP response which is sent by an Express app when it gets an HTTP request.  It sends response back to the client browser.  It facilitates you to put new cookies value and that will write to the client browser (under cross domain rule).  Once you res.send() or res.redirect() or res.render(), you cannot do it again, otherwise, there will be uncaught error.  Ex: - res.send({ message: 'hey' }); Express.js Objects
  • 7.  GET and POST Request :- GET and POST both are two common HTTP requests used for building REST API's. GET requests are used to send only limited amount of data because data is sent into header while POST requests are used to send large amount of data because data is sent in the body.  Express.js facilitates you to handle GET and POST requests using the instance of express.  Cookie :- Cookies are small piece of information.  Ex :- var express = require('express'); var parser = require(“cookie-parser”);  File Upload :- In Express.js, file upload is slightly difficult because of its asynchronous nature and networking approach.  It can be done by using middleware to handle multipart/form data. There are many middleware that can be used like multer, connect, body-parser etc. Express.js Objects
  • 8.  Routing :- Routing is made from the word route. It is used to determine the specific behaviour of an application. It specifies how an application responds to a client request to a particular route, URI or path and a specific HTTP request method (GET, POST, etc.). It can handle different types of HTTP.  Ex:- Express.js Objects app.delete('/del_student', function (req, res) { console.log("Got a DELETE request for /del_student"); res.send('Record Deleted!'); })
  • 9. Session III completed Address: 403, Venus Benecia, Bodakdev,Ahmedabad – 380053 Reach us : reach@techforceinfotech.com Contact no: +91 (79) 48904529