Host HTML file with ngrok

前端 未结 2 1185
春和景丽
春和景丽 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:15

    Yes. ngrok now has a built-in fileserver. https://ngrok.com/docs#http-file-urls

    Their example command Linux/mac:

    ngrok http -auth="user:password" file:///Users/alan/share
    

    Windows:

    ngrok http -auth="user:password" "file:///C:\Users\alan\share"
    

    This will create an HTTP server with a basic auth username and password, sharing all files in the directory /Users/alan/share.

提交回复
热议问题