← Over the wire · all materialsBuild · 45 min · individually · demos next class
Build

Connect it, then ship a feature

Individually, against the course's HTTP server: everyone has their own market on it. Step 1 is the same for everyone: the market from Lecture 5 stops reading data.js and loads its vendors from the API. Step 2 is one feature from the briefs below, started in class if there's time and finished at home for the demo next class.

Step 1 · everyone (the 45 minutes)

The rule

Done means done with chaos on. Your work behaves with chaos on, set on the control page harbour-api.lopin.me (every response 1.2 s late, 30 % of them a 503): there is a loading state, every failure says something and recovers, and nothing happens twice.

Step 2 · pick a brief (start in class, finish at home)

Every brief starts from a connected market: your own after step 1, in a new branch and a second pull request to harbour-market-starter. Your feature goes in a new module in starter/js/, imported from main.js, and every request goes through your api.js. Paths are relative to /api: getJSON("/stalls/taco-bike/reviews"); third-party APIs take a full https://… URL. Each brief has four core items: those are the minimum for the demo.

The six briefs (and two spares)

How you work

Your market

Everyone has their own copy of the market on the course server: https://harbour-api.lopin.me/<your-github-username>/api. The control page harbour-api.lopin.me checks it, turns chaos on and off (latency, 503s), and resets it to the seed data. Nothing you do there affects anyone else. One slow and unreliable request only: add ?chaos=1 to its URL.

Demos next class

One per person, about your brief from step 2 (or, if you didn't get that far, the connected market).

3 minutes each
  1. The happy path, with the Network panel open next to the page.
  2. Chaos on: the loading state, one failure, and how the page recovers.
  3. One request in code: the call, the status codes you handle, where the state changes.
  4. One bug you hit, and what showed it to you.