Configuring a Server to Host Your WebRTC App

As promised in this book’s opening chapters, you’ve not had to do any server-side work to speak of. Whenever you’ve run npm start or npm start:demos, however, you’ve been using a small bundle of server-side scripts in development. They are minimal, but let’s talk about them briefly, so there’s a little less mystery surrounding this chapter’s sudden talk of server-side scripting.

Understanding Your App’s Server Requirements

There are a few files to check out in the deploy/ directory. The first is the package.json file, which includes four dependencies:

 "dependencies"​: {
 "express"​: ​"^4.18.2"​,
 "http-errors"​: ​"~1.6"​,
 "morgan"​: ​"~1.9"​,
 "socket.io"​: ​"^4.6.1"
 }

Just like you’ve ...

Get Programming WebRTC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.