Skip to content

dsc-iiest/sample-express-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro to REST APIs

HTTP/HTTPS

  • Hyper Text Transfer Protocol / Secure
  • Protocol of the web
  • Stateless
  • Responsible for communication b/w client & web servers

HTTP Verbs

Method Purpose
GET Retrieve resource
POST Create resource
PUT Update resource
DELETE Delete resource

MDN Docs for HTTP Methods

HTTP Status Codes

Codes Description
1xx Informational
2xx Success
3xx Redirection Message
4xx Client Error
5xx Server Error

MDN Docs for Status Code

API (Application Program Interface)

API is a software intermediary that allows two applications to talk to each other.

REST (REpresentational State Transfer)

  • Standardized & Simple
  • High performance due to caching support
  • Highly scalable as stateless
  • Not bound to any specific programming language

Commands

Initialize the npm

npn init -y

Install the packages

npm i express nodemon

Make the changes in the package.json

"start": "node index.js",
"dev": "nodemon index.js",

To run the server in dev mode (using nodemon)

npm run dev

About

Intro to REST API Source Code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •