Search…
⌃K

Expose a local web server

This tutorial will explain how to expose a localhost web server and give it a shareable link that is accessible from the internet.

1. Prepare the website

We have here a website as follows
Website files

2. Start a web server

We will serve the website by using any webserver (apache, nginx..etc), in our case we chose http-server(a simple, zero-configuration command-line http server).
Starting a webserver
Now we have website running on localhost at http://localhost:8081 .

3. Start an HTTP tunnel

loclx tunnel http --to 127.0.0.1:8081 --subdomain hello-world
After creating the tunnel and getting a shareable link to our website, we can access the website from that URL.
Our website accessible now from the internet