April 2020
Intermediate to advanced
292 pages
6h 50m
English
Okay, when we left the record-viewings application, we were in the function that would record that a video was viewed. Here’s where we left off:
| | function createActions ({ |
| | db |
| | }) { |
| | function recordViewing (traceId, videoId) { |
| | } |
| | |
| | return { |
| | recordViewing |
| | } |
| | } |
We decidedhere that we’ll use VideoViewed events to record video views. We’ll write these events to streams of the form viewing-X, where X is the video’s ID. So all we need to do in this function is build the event we’re going to write and then write it to the Message Store:
The Code Directory Has Changed | |
|---|---|
|
From this point going forward in the book, the code is in the code/video-tutorials/ folder. If you’re ... | |