Groan at some dad jokes and rate them as well. Which joke will be your favorite?
This API is built with JSON Server. It provides the backend service for the Dad Joke Dadabase app found here: https://github.com/thawkin3/dad-joke-dadabase
npm install
npm start
This will start the json-server API on port 3000.
# See the current database contents
GET /db
GET /jokes
GET /jokes/1
POST /jokes
PUT /jokes/1
PATCH /jokes/1
DELETE /jokes/1
# Get a specific joke with all ratings included
GET /jokes/1?_embed=ratings
# Get all ratings for a specific joke
GET /jokes/1/ratings
# Get all jokes with all ratings included
GET /jokes?_embed=ratings
GET /ratings
GET /ratings/1
POST /ratings
PUT /ratings/1
PATCH /ratings/1
DELETE /ratings/1
# Get all ratings for a specific joke
GET /ratings?jokeId=1
# Get a rating along with the joke itself
GET /ratings/1?_expand=joke