April 2020
Intermediate to advanced
292 pages
6h 50m
English
Okay, now that you’ve imagined the equivalent of earning a PhD, let’s get about the business of collecting those view analytics. The button we’ll use to simulate views is already on the screen, and if you inspect the Pug template at code/first-pass/src/app/home/templates/home.pug, you’ll see that it submits to /record-viewing/12345. The 12345 is a fake video ID, but the /record-viewing path is where we’ll mount the application that records viewing videos.
Let’s write that application:
| 1: | const express = require('express') |
| - | |
| - | function createActions ({ |
| - | }) { |
| 5: | return { |
| - | } |
| - | } |
| - | |
| - | function createHandlers ({ actions }) { |
| 10: | return { |
| - | } |
| - |
Read now
Unlock full access