Easily Provide a Web Page from Your Own Computer

You can safely open the services you run on your computer to the internet with ngrok. ngrok creates a secure tunnel between our computer and the internet, transmits requests from the internet to our computer and transmits the response it receives to the client.
Usually working with APIs, need to get callbackurl’s requests. I am present here so simple way to do that with ngrok. Just with three lines of code.
For MacOS, use HomeBrew to install ngrok:
brew install ngrok/ngrok/ngrok
For Linux, use Apt:
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | \
sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && \
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | \
sudo tee /etc/apt/sources.list.d/ngrok.list && \
sudo apt update && sudo apt install ngrok
To Start ngrok firstly run web server on 8000 port:
python3 -m http.server 8000
then start ngrok to accept requests:
ngrok http 8000
We use the ngrok http 8000 command to open our web server, which we run from the 8000 port, to the internet. As can be seen in the terminal output, ngrok opens port 8000 to the internet via http://a44c3a39.ngrok.io and https://a44c3a39.ngrok.io. Of course, these addresses will change every time you run it.
Then go to web interface as open http://127.0.0.1:4040 on your browser. This interface be provide to see requests that done your endpoint. The endpoint given with randomly by ngrok. You can see that endpoint on terminal that started ngrok as web interface.