file:// link doesn’t work. Things like retrieving JSON or accessing the webcam require you to load the page via http://localhost instead.
Just install it with
npm install –g http-server, and then run it from whatever folder your website is in with
http-server or even simpler
Now browse to http://localhost:8080, and view your site.
Of course if you’re a seasoned web developer I’m sure you know about this already, as well as a thousand other ways to do the same thing. For a more advanced local server, there is browser-sync, which has the ability to live re-load the browser as you edit your local assets. But most of the time,
http-server works just fine for me.