- Explain how to set up and run an Express application
- Build a simple Express API and send a HTTP request to an available endpoint using a HTTP client
- Explain that JSON is a widely-used language-agnostic format for encoding data as attribute value pairs
- Diagram the request and response cycle for an Express API.
- Use console.log() and read the result in the server logs
Implement the API for this exercise using an API client like Insomnia.
Use the API Spec as your source of requirements for each endpoint you need to build.
Before you begin, the API is going to use global variables to hold data - which will persist while the application
is running, but won't persist in between application restarts. These global variables are located in the /data
directory.
- Fork and clone this repository
- Create an express application following the same steps as per the previous exercise
- Implement the API, starting with the
contacts
endpoint, following this workflow for each endpoint:- Diagram the endpoint lifecycle in a sequence diagram, using the image below these steps as a starting point
- Implement the endpoint
- Test the endpoint using any method you like; Insomnia, curl, unit tests etc.
- The global variables that you should use as your data stores are found in the
/data
directory.- Core criteria uses the variable exported from
/data/contacts.js
- Extension criteria uses the variable exported from
/data/meetings.js
- The default/initial values stored in these variables must not be modified as the tests are dependent on these
- You will need to work out a way to handle keeping track of the IDs for new resources that are created
- Core criteria uses the variable exported from
Implement GET, POST, PUT and DELETE endpoints for meetings
following the same workflow as above