Skip to content

Instantly share code, notes, and snippets.

@pwrmvspark
Forked from Shurlow/rest-express.md
Last active June 17, 2019 19:04
Show Gist options
  • Select an option

  • Save pwrmvspark/9a30a62870d314f3f9334372d78a50c5 to your computer and use it in GitHub Desktop.

Select an option

Save pwrmvspark/9a30a62870d314f3f9334372d78a50c5 to your computer and use it in GitHub Desktop.
REST & Express lesson notes

REST (Representational State Transfer)

Objectives

  • Describe the concept of resources in relation to REST and APIs
  • Identify conventions for various routes including naming convention, HTTP verbs, and status codes
  • Build RESTful routes for a given resource

Guiding Questions

  • What is a resource?

    Your answer...

  • What are the five common actions of an API? What methods and status codes are typically used for the five common actions?

Action Method Path Body

Your answer...

  • How would you build RESTful routes for the following data? The

    const authors = [
      {
        name: 'Haruki Murakami',
        books: [
          { title: 'Hard-Boiled Wonderland and the End of the World' },
          { title: 'The Wind-Up Bird Chronicle' }
        ]
      },
      {
        name: 'Kurt Vonnegut'
        books: [
          { title: 'Slaughterhouse-Five' }
        ]
      }
    ]

    Your answer...

  • Build RESTful routes for one of the following resources: cards, dogs, engineers

    Your answer...

https://learn.co/lessons/rest-quiz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment