API = Application Programming Interface: think of it as a contract that says, if you provide data to me in a certain way, I will give it back to you in a certain way
HTML Verbs - how we tell the API to do something for us
GET: gets some information
POST: creates something new (we use Postman for this)
PUT / PATCH: updates info that is already stored
DELETE: deletes existing information
HEAD: asks, is everything ok?
Setting up our back end code
Step 1: const express = require ("express")
Step 2: const app = express
Last step: app.listen(3000,() => "Server is up and running")
Everything in the middle tells us "what is this API about"
API = Application Programming Interface: think of it as a contract that says, if you provide data to me in a certain way, I will give it back to you in a certain way
HTML Verbs - how we tell the API to do something for us GET: gets some information POST: creates something new (we use Postman for this) PUT / PATCH: updates info that is already stored DELETE: deletes existing information HEAD: asks, is everything ok?
Setting up our back end code Step 1: const express = require ("express") Step 2: const app = express Last step: app.listen(3000,() => "Server is up and running") Everything in the middle tells us "what is this API about"