Build Your Own RESTful API From Scratch Flashcards

1
Q

What is REST?

A
REpresentational State Transfer
Client - Server Architecture
Client (analogy of a customer) makes a request to a Server
Server (analogy of a waiter) responds to the request
Sent through (analogy of a language):
HTTP Request
FTP Request
HTTPS Request
Secured
API (analogy of a menu)
Set of services that the client can interact with the server
REST is a architectural style of designing API’s
Rules to be RESTful
HTTP Request Verbs
GET
Read
PUT
Full Update
PATCH
Partial Update
POST
Create
DELETE
Delete
Using specific pattern of routes/endpoint URLs
/{routes}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Creating a Database with Robo 3T

A

Robo 3T
GUI for MongoDB
By default Robo 3T will connect to localhost:27017
First, we must startup the mongodb server, by running “mongod” in the terminal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Creating a Database [2]

A
Set up Server Challenge
GET all articles
POST an article
Install Postman
Postman allows us to test out our APIs without creating the additional components needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Chained Route Handlers Using Express

A
app.route()
get
post
delete
…
Using Express Route can reduce redundancy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

GET/ PUT

A

GET a specific article
PUT a specific article

PATCH a specific article
DELETE a specific article

How well did you know this?
1
Not at all
2
3
4
5
Perfectly