Giter Site home page Giter Site logo

backend-cartoon-cats's Introduction

Cartoon Cats

Demo

Cartoon Cats API

Getting Started

Use this template to get started.

Learning Objectives

  • Create a GET endpoint using Express that returns an array of objects
  • Create a GET endpoint using Express that returns a single object based on the id and req.params.id
  • Test Express controller routes expectations using Jest and Supertest
  • Explain how Express tries routes, in what order, and when it will stop or continue

Description

Welcome to your first Express app! We're going to be building out two different endpoints that returns information about cartoon cats listed in the data/cats.js file. For today's deliverable, you will be focused on the controllers section of the lib folder.

Your tests have been provided for you -- before you start, read through the tests to understand what is expected to be returned from your endpoints.

The only code you need to add in this deliverable is in controllers/cats.js -- take a look at line 10 in lib/app.js to see how the controllers are connected via namespaces to the application.

Acceptance Criteria

  • A user should be able to visit /cats and see a list of cats with their id and name (note: do NOT return the entire array of cats - only the id and name)
  • A user should be able to visit /cats/:id and see all the detailed information about the cat with the corresponding id

Rubric

Task Points
All tests passing 2
Home page should return HTML showing the list of routes available 2
/cats/ route returns list of cats' names and ids 2
/cats/:id route returns detailed cat information 4

backend-cartoon-cats's People

Contributors

emilysellers avatar

Watchers

 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.