Giter VIP home page Giter VIP logo

lab-06's Introduction

CF LAB: HTTP and REST

Before you begin

  • You'll need to initialize this lab folder as a new node module, install your dependencies, setup your npm script commands, and pull in your config files

Assignment

Requirements
  • Implement an API server for a storefront, using json-server

    • Create a sub-folder called data with a db.json file
    • Start your json-server from within this folder
    • Data models:
      • categories
        • _id, name, display_name, description
      • products
        • _id, category, name, display_name, description
  • Implement a Web Server with express and ejs

    • Static routes and assets served from the public folder
    • 2 dynamic routes:
    • /categories
      • Lists each categories and draws a link to a detail page (/category/:name)
    • /category/:name
      • Lists the products in the category
  • Implement a next.js based REST client (RESTy)

    • Perform a GET request to a typed in URL and spit out the output separately:
      • Headers
      • Body
Testing

Web Server

  • Use supertest to assert that the server responds to the routes
  • Mock out the API calls in the web server test

Documentation

Include your travis badge at the top of your README.md file In your README.md, describe the exported values of each module you have defined. Every function description should include it's airty (expected number of parameters), the expected data for each parameter (data-type and limitations), and it's behavior (for both valid and invalid use). Feel free to add any additional information in your README.md that you would like.

lab-06's People

Contributors

johncokos avatar

Watchers

James Cloos avatar Kevin O'Halloran avatar  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.