How to run html file on localhost?

后端 未结 8 686
再見小時候
再見小時候 2020-12-04 08:41

I have a html file and i run it on localhost. But, this file includes mirror using webcam. Example, how can i run this html file on localhost? Webcam starting on this exampl

8条回答
  •  借酒劲吻你
    2020-12-04 09:21

    On macOS:

    Open Terminal (or iTerm) install Homebrew then run brew install live-server and run live-server.

    You also can install Python 3 and run python3 -m http.server PORT.

    On Windows:

    If you have VS Code installed open it and install extension liveserver, then click Go Live in the bottom right corner.

    Alternatively you can install WSL2 and follow the macOS steps via apt (sudo apt-get).

    On Linux:

    Open your favorite terminal emulator and follow the macOS steps via apt (sudo apt-get).

提交回复
热议问题