Host HTML file with ngrok

前端 未结 2 1178
春和景丽
春和景丽 2021-02-04 05:37

Is it possible to host, instead of a web app, a HTML file with NGROK? I really don\'t know anything about NGROK, I just used it to host a server for a Twilio app, and am wanting

2条回答
  •  清酒与你
    2021-02-04 06:01

    No. ngrok only tunnels traffic, so it can't actually serve the HTML file for you.

    You can, however, serve a directory of files very easily. One of the quickest ways to start a server is with python. From the command line, cd to the directory containing your HTML files and run:

    $ python -m SimpleHTTPServer
    

    Or for python3 (not installed by default on OS X):

    $ python -m http.server
    

    Then, in another terminal, run ngrok.

提交回复
热议问题