Host HTML file with ngrok
Yes. ngrok now has a built-in fileserver. https://ngrok.com/docs/secure-tunnels#http-tunnels-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
.
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
.