SlideShare a Scribd company logo
2
Most read
5
Most read
7
Most read
RESTful API with
Node JS and
Express
Agenda
▷ What is API?
▷ Contrasting common types of APIs
▷ What is Node JS and Express?
▷ Installing Express
▷ Coding Session
▷ Q & A
▷ Workshop
1.
What is API?
“An API is a precise specification of
the programming instruction and
standards to access a web based
software or web tool acting as a link
between the programmer and the
application.
What is an API?
▷ Acronym for Application Program
Interface.
▷ Acts as a bridge between the
programmer and application.
▷ Takes specific requests predefined
when created.
▷ Verifies the requests and then processes
the data.
▷ Gives detailed info on what and how the
request are to be made.
REST APIs
▷ REST stands for Representational State Transfer. (ReST)
▷ It is not a framework but Architectural Principle.
▷ Uses HTTP requests which is oriented around verbs and
resources ( GET, POST, PUT, DELETE)
▷ The verbs are applied to resources ( data )
POST something to database.
GET something from Users.
DELETE something from clients.
▷ The request consist of Headers, body and methods.
▷ The response consists of Status Code, Headers and the body.
▷ Caching and Stateless.
▷ Data represented mostly through HTML / XML / JSON.
REST APIs
Contrasting types of APIs
REST
▷ Stands for Representational
State Transfer.
▷ Is an Architectural principle.
▷ Permits different data
formats.
▷ Better Performance and
Scalability.
▷ Supports Caching .
▷ Limited to single HTTP
transaction. Expects user to
retry if something fails.
▷ Used in all type of system
apart from some where high
security risk are present.
SOAP
▷ Stands for Simple Object
Access Protocol.
▷ Is a protocol.
▷ Permits only XML.
▷ Scalable but at a very
minimum level.
▷ Doesn’t support caching.
▷ Can ensure ACID
transactions.
▷ Used mostly in High risk
enterprise softwares and
banking softwares.
About Node.js
Node.js is not a silver-bullet
new platform that will
dominate the web
development world. Instead,
it’s a platform that fills a
particular need
What is challenge in web
development?
Thread handling.
Why Node.JS ?
Open
Source
Non -
Blocking
Large
community
Asynchronous I/O
Blocking&Non-BlockingCode
Blocking Code Example
var fs = require("fs");
var data =
fs.readFileSync('input.txt');
console.log(data.toString());
console.log("Program Ended");
Output
Everything in the file input.txt
Program Ended
Non-Blocking Code Example
var fs = require("fs");
fs.readFile('input.txt', function
(err, data) {
if (err) return
console.error(err);
console.log(data.toString());
});
console.log("Program Ended");
Output
Program Ended
Everything in the file input.txt
BasicExample
var http = require("http");
http.createServer(function(request, response){
response.writeHead(200, {'Content-Type':
'text/html'});
response.end('<h1>Hello World</h1>');
}).listen(1234);
console.log("Server running at port 1234");
Rest api with node js and express
ThankYou

More Related Content

What's hot (20)

PPTX
Introduction to spring boot
Santosh Kumar Kar
 
PPTX
REST & RESTful Web Services
Halil Burak Cetinkaya
 
PDF
Introduction to ASP.NET Core
Avanade Nederland
 
PPTX
ASP.NET Web API
habib_786
 
PDF
Spring MVC Framework
Hùng Nguyễn Huy
 
PPTX
Node.js Express
Eyal Vardi
 
PDF
Api presentation
Tiago Cardoso
 
PPTX
Getting started with typescript
C...L, NESPRESSO, WAFAASSURANCE, SOFRECOM ORANGE
 
PPTX
React Native
Fatih Şimşek
 
PPTX
Introduction to node.js
Dinesh U
 
PDF
Express node js
Yashprit Singh
 
PPTX
Json Web Token - JWT
Prashant Walke
 
PPTX
Build RESTful API Using Express JS
Cakra Danu Sedayu
 
PPTX
[Final] ReactJS presentation
洪 鹏发
 
PPTX
.Net Core
Bertrand Le Roy
 
PDF
Expressjs
Yauheni Nikanovich
 
PPTX
Introduction Node.js
Erik van Appeldoorn
 
PDF
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
 
PDF
Spring Boot
koppenolski
 
PPTX
Rest API
Rohana K Amarakoon
 
Introduction to spring boot
Santosh Kumar Kar
 
REST & RESTful Web Services
Halil Burak Cetinkaya
 
Introduction to ASP.NET Core
Avanade Nederland
 
ASP.NET Web API
habib_786
 
Spring MVC Framework
Hùng Nguyễn Huy
 
Node.js Express
Eyal Vardi
 
Api presentation
Tiago Cardoso
 
Getting started with typescript
C...L, NESPRESSO, WAFAASSURANCE, SOFRECOM ORANGE
 
React Native
Fatih Şimşek
 
Introduction to node.js
Dinesh U
 
Express node js
Yashprit Singh
 
Json Web Token - JWT
Prashant Walke
 
Build RESTful API Using Express JS
Cakra Danu Sedayu
 
[Final] ReactJS presentation
洪 鹏发
 
.Net Core
Bertrand Le Roy
 
Introduction Node.js
Erik van Appeldoorn
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
 
Spring Boot
koppenolski
 

Viewers also liked (9)

PPTX
Create simple api using node js
Edwin Andrianto
 
PPTX
Building an API in Node with HapiJS
Loc Nguyen
 
PPTX
Building Web Apps & APIs With Node JS
Lohith Goudagere Nagaraj
 
PPT
Building your first Node app with Connect & Express
Christian Joudrey
 
PDF
Architecting large Node.js applications
Sergi Mansilla
 
PDF
Build a REST API for your Mobile Apps using Node.js
Stormpath
 
PDF
Anatomy of a Modern Node.js Application Architecture
AppDynamics
 
PDF
The Enterprise Case for Node.js
NodejsFoundation
 
KEY
Node.js - Best practices
Felix Geisendörfer
 
Create simple api using node js
Edwin Andrianto
 
Building an API in Node with HapiJS
Loc Nguyen
 
Building Web Apps & APIs With Node JS
Lohith Goudagere Nagaraj
 
Building your first Node app with Connect & Express
Christian Joudrey
 
Architecting large Node.js applications
Sergi Mansilla
 
Build a REST API for your Mobile Apps using Node.js
Stormpath
 
Anatomy of a Modern Node.js Application Architecture
AppDynamics
 
The Enterprise Case for Node.js
NodejsFoundation
 
Node.js - Best practices
Felix Geisendörfer
 
Ad

Similar to Rest api with node js and express (20)

PPTX
Switch to Backend 2023 | Day 1 Part 1
Google Developer Students Club NIT Silchar
 
PDF
IRJET- Rest API for E-Commerce Site
IRJET Journal
 
PPTX
REST API
Kanushka Gayan
 
PDF
Rest API Interview Questions PDF By ScholarHat
Scholarhat
 
PPTX
Apitesting.pptx
NamanVerma88
 
PDF
APIs Design - Creation - Management.pdf
WilliamELKAIMPhd
 
PDF
Building Killer RESTful APIs with NodeJs
Srdjan Strbanovic
 
PPTX
REST-API's for architects and managers
Patrick Savalle
 
PDF
Ebook undisturbed rest-v1 [res_tful apis]
johnkbutcher
 
PPTX
API Development Essentials: REST, SOAP, GraphQL Explained
ankitraj5ar
 
PPTX
Undisturbed rest chapter01
Cuong Tran
 
PPTX
REST and RESTful Services
Damian T. Gordon
 
PDF
Node.js server side render in the Age of APIs - Full Stack Toronto 2017
Ruy Adorno
 
PPTX
What is an API?
Muhammad Zuhdi
 
PDF
Алексей Веркеенко "Symfony2 & REST API"
Fwdays
 
PPTX
80068
DEEPIKA T
 
PPTX
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Jackson F. de A. Mafra
 
PDF
RESTful API in Node.pdf
SudhanshiBakre1
 
Switch to Backend 2023 | Day 1 Part 1
Google Developer Students Club NIT Silchar
 
IRJET- Rest API for E-Commerce Site
IRJET Journal
 
REST API
Kanushka Gayan
 
Rest API Interview Questions PDF By ScholarHat
Scholarhat
 
Apitesting.pptx
NamanVerma88
 
APIs Design - Creation - Management.pdf
WilliamELKAIMPhd
 
Building Killer RESTful APIs with NodeJs
Srdjan Strbanovic
 
REST-API's for architects and managers
Patrick Savalle
 
Ebook undisturbed rest-v1 [res_tful apis]
johnkbutcher
 
API Development Essentials: REST, SOAP, GraphQL Explained
ankitraj5ar
 
Undisturbed rest chapter01
Cuong Tran
 
REST and RESTful Services
Damian T. Gordon
 
Node.js server side render in the Age of APIs - Full Stack Toronto 2017
Ruy Adorno
 
What is an API?
Muhammad Zuhdi
 
Алексей Веркеенко "Symfony2 & REST API"
Fwdays
 
80068
DEEPIKA T
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Jackson F. de A. Mafra
 
RESTful API in Node.pdf
SudhanshiBakre1
 
Ad

Recently uploaded (20)

PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Digital Circuits, important subject in CS
contactparinay1
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 

Rest api with node js and express

  • 1. RESTful API with Node JS and Express
  • 2. Agenda ▷ What is API? ▷ Contrasting common types of APIs ▷ What is Node JS and Express? ▷ Installing Express ▷ Coding Session ▷ Q & A ▷ Workshop
  • 4. “An API is a precise specification of the programming instruction and standards to access a web based software or web tool acting as a link between the programmer and the application.
  • 5. What is an API? ▷ Acronym for Application Program Interface. ▷ Acts as a bridge between the programmer and application. ▷ Takes specific requests predefined when created. ▷ Verifies the requests and then processes the data. ▷ Gives detailed info on what and how the request are to be made.
  • 7. ▷ REST stands for Representational State Transfer. (ReST) ▷ It is not a framework but Architectural Principle. ▷ Uses HTTP requests which is oriented around verbs and resources ( GET, POST, PUT, DELETE) ▷ The verbs are applied to resources ( data ) POST something to database. GET something from Users. DELETE something from clients. ▷ The request consist of Headers, body and methods. ▷ The response consists of Status Code, Headers and the body. ▷ Caching and Stateless. ▷ Data represented mostly through HTML / XML / JSON. REST APIs
  • 8. Contrasting types of APIs REST ▷ Stands for Representational State Transfer. ▷ Is an Architectural principle. ▷ Permits different data formats. ▷ Better Performance and Scalability. ▷ Supports Caching . ▷ Limited to single HTTP transaction. Expects user to retry if something fails. ▷ Used in all type of system apart from some where high security risk are present. SOAP ▷ Stands for Simple Object Access Protocol. ▷ Is a protocol. ▷ Permits only XML. ▷ Scalable but at a very minimum level. ▷ Doesn’t support caching. ▷ Can ensure ACID transactions. ▷ Used mostly in High risk enterprise softwares and banking softwares.
  • 9. About Node.js Node.js is not a silver-bullet new platform that will dominate the web development world. Instead, it’s a platform that fills a particular need
  • 10. What is challenge in web development? Thread handling.
  • 11. Why Node.JS ? Open Source Non - Blocking Large community
  • 13. Blocking&Non-BlockingCode Blocking Code Example var fs = require("fs"); var data = fs.readFileSync('input.txt'); console.log(data.toString()); console.log("Program Ended"); Output Everything in the file input.txt Program Ended Non-Blocking Code Example var fs = require("fs"); fs.readFile('input.txt', function (err, data) { if (err) return console.error(err); console.log(data.toString()); }); console.log("Program Ended"); Output Program Ended Everything in the file input.txt
  • 14. BasicExample var http = require("http"); http.createServer(function(request, response){ response.writeHead(200, {'Content-Type': 'text/html'}); response.end('<h1>Hello World</h1>'); }).listen(1234); console.log("Server running at port 1234");