cd
intoexpress-db-lab
- run
createdb nobel_prizes_db
- run
npm install
- run
npm run resetDb
andnpm run seed
- Start up the server with
npm start
and try navigating to the root route
Write a route handler for /prizes
that uses the Prize
model to fetch all prizes from the db and then render them in the response
Write a route handler prizes/:id
that fetches a particular Prize by the id passed in :id
param. Hint: Don't forget to coerce the id to an Int.
Try to implement another route for fetching a list of prizes based on category