- Hyper Text Transfer Protocol / Secure
- Protocol of the web
- Stateless
- Responsible for communication b/w client & web servers
| Method | Purpose |
|---|---|
| GET | Retrieve resource |
| POST | Create resource |
| PUT | Update resource |
| DELETE | Delete resource |
| Codes | Description |
|---|---|
| 1xx | Informational |
| 2xx | Success |
| 3xx | Redirection Message |
| 4xx | Client Error |
| 5xx | Server Error |
API is a software intermediary that allows two applications to talk to each other.
- Standardized & Simple
- High performance due to caching support
- Highly scalable as stateless
- Not bound to any specific programming language
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