0

I'm a newbie so sorry if this is a stupid question.

I was trying to setup this a-frame boilerplate code.

https://github.com/aframevr/aframe-boilerplate

This is the instructions given.

To serve the site from a simple Node development server:

npm start Then launch the site from your favourite browser:

http://localhost:3000/

This works as expected, but the webcam is restricted because the site is http and not https. I want to know how to serve this as https instead?

Furthermore I am confused on what actually happens when you do npm start.

The start script is budo --live --verbose --port 3000 --open.

But the project doesn't have any js files that could be the server. Only the html file in the front end. What actually happens with npm start?

Piotr Adam Milewski
  • 14,150
  • 3
  • 21
  • 42
enzio902
  • 457
  • 6
  • 14

1 Answers1

0

npm start runs:

"start": "budo --live --verbose --port 3000 --open",
  • running budo starts the server
  • --live enables LiveReload on HTML/CSS/JS file changes
  • --verbose enables debug messages
  • --port defines the port
  • --open launches the browser once connected
  • by default it uses index.html which is in the main directory

If you want to create a https server instead of http you need to add one more option:

--ssl, -S        create an HTTPS server instead of HTTP

If you see some unknown commands run, always try to find the documentation and search the keywords (like HTTPS).

Piotr Adam Milewski
  • 14,150
  • 3
  • 21
  • 42
  • I added `--ssl, -S` to the command but still browser says Not Secure. – enzio902 Dec 03 '19 at 09:06
  • What OS, and browser are you at ? The [official gh](https://github.com/mattdesl/budo/blob/dcbc05866f583e172d6b46c898048436ab84ddae/docs/command-line-usage.md#ssl-and-https) says you might need to add an exception when on chrome, or generate your own certificate when working on iOS. – Piotr Adam Milewski Dec 03 '19 at 09:30
  • I'm on macos using chrome. – enzio902 Dec 03 '19 at 12:34