2. Setup Ngrok Tunnel
This API is running locally on http://localhost:5001/ in order for our platform to talk with it you need to expose your API to the internet. The easiest way to do this when running locally is to run ngrok tunnel. It's free and secure.
Install NGrok
Get account https://ngrok.com/ & follow this https://ngrok.com/docs/getting-started/ .
Start NGrok Host
After setup you now can forward your API to the public.
$ ngrok http http://localhost:5001
You then should see something like in your terminal.
ngrok (Ctrl+C to quit)
Session Status online
Account inconshreveable (Plan: Free)
Version 3.0.0
Region United States (us)
Latency 78ms
Web Interface http://127.0.0.1:4040
Forwarding https://84c5df474.ngrok-free.dev -> http://localhost:5001
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00Take note of your URL
You should now be able to access your API using the https://... route given to you by ngrok. In the above example you can see the url was give as https://84c5df474.ngrok-free.dev.
Last updated