In this workshop, you'll be provided this GitHub repo with details for a full operational CRUD API that uses Express.JS, PostgreSQL, and other technologies that you've been trained on.
Begin this Career Simulation by cloning the GitHub repo, pseudocoding prompts, installing dependencies and solving the problems below.
The GET route for all pets is currently "under construction". Navigate to index.js
and find the GET method at /api/v1/pets
and write the code to get all pets from the database.
The GET route for pets by name is currently "under construction". Navigate to index.js
and find the GET method at /api/v1/pets/:name
and write the code to get a pet by name from the database.
The GET route for pets by owner's name is currently "under construction". Navigate to index.js
and find the GET method at /api/v1/pets/owner
and write the code to get a pet by owner's name from the database.
The GET route for serving a static index.html file is currently "under construction". Navigate to index.js
and find the GET method at /
and write the code to serve a static index.html file.
Port 8080 by default.
Method | Endpoint | Description |
---|---|---|
GET | / | Serve a static index.html file |
GET | /api | Returns 'Hello World!' |
GET | /api/v1/pets | Get all pets |
GET | /api/v1/pets/:name | Get a pet by name |
GET | /api/v1/pets/owner | Get a pet by owner's name |