Someone asked me how to video stream using Node.js. This was something I hadn’t tried yet, so I thought, “why not!” Let me share my findings with you.

The challenge was to create a route which sends a .mp4 file to a page and makes the video available for viewing.

The way I decomposed it:

Make a server route to feed the video.

Use HTML5 and JS to request the feed.

Make the video load in parts instead of it being loaded from the start.

TL;DR — You can find a working demo of video streaming here.