AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Use ngrok to show local web server mac4/21/2023 ![]() ![]() The contents can be accessed locally by pointing your browser to Now that the simple web server is running, it's time to configure ngrok to make this server accessible by the Internet at large. Any port can be specified here, but make sure it's one that is not currently in use. ![]() ![]() With this command, the SimpleHTTPServer will serve up the contents of the current directory on port 8000. In Python 3 this can be done by running python -m rver 8000. In Python 2.7 (which is the default version that comes with macOS) the server is started by running python -m SimpleHTTPServer 8000. First, let's get the Python web server running on port 8000.Ī super quick way to fire up a web server, with virtually no configuration (especially if you're on macOS) is to use Python's SimpleHttpServer. However, you are more than welcome to continue reading if this sounds interesting to you. This blog post is more of an insurance policy against my faulty memory, so I can easily remind myself of these things in the future. Then, using a tool called ngrok I could make that server accessible to the world. All I needed was to run a single Python command to fire up a local web server. ![]() Then, after much searching, the fog cleared. I had done this dozens of times before, but for the life of me, I could not remember the exact tools I needed to get this job done. On a machine that was only a few weeks old, I needed to make an HTML file quickly accessible to the outside world. And some of the things you thought you'd never forget stubbornly hide behind the memories that are much easier to recall. One of the nice things about starting a new job is that you have to setup all of your development tools and environments from scratch. ![]()
0 Comments
Read More
Leave a Reply. |