Giter VIP home page Giter VIP logo

api-express-address-book's Introduction

Learning Objectives

  • 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

Exercise

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.

Set up

  1. Fork and clone this repository
  2. Create an express application following the same steps as per the previous exercise
  3. Implement the API, starting with the contacts endpoint, following this workflow for each endpoint:
    1. Diagram the endpoint lifecycle in a sequence diagram, using the image below these steps as a starting point
    2. Implement the endpoint
    3. Test the endpoint using any method you like; Insomnia, curl, unit tests etc.
  4. The global variables that you should use as your data stores are found in the /data directory.
    1. Core criteria uses the variable exported from /data/contacts.js
    2. Extension criteria uses the variable exported from /data/meetings.js
    3. The default/initial values stored in these variables must not be modified as the tests are dependent on these
    4. You will need to work out a way to handle keeping track of the IDs for new resources that are created

Extension

Implement GET, POST, PUT and DELETE endpoints for meetings following the same workflow as above

api-express-address-book's People

Contributors

chloe070196 avatar vherus avatar dearshrewdwit avatar julesnuggy avatar logi13 avatar dependabot[bot] avatar auenc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.