We have ran ngrok on a localhost PORT say http://localhost:4000. We can manually test if the ngrok is already runing or not by using the following steps:
Check if ngrok is already running:
If the connection happens successfully, the following visual will show up:
If the above visual is not showing, ngrok is not running at all.
- Under Tunnels section, the following visual will show up:
If the above visual is not showing, ngrok is not running on PORT 4000.
To start ngrok on http://localhost:4000, we need to run ngrok http 4000. After running this command, the above visuals will show up.
Is there some programmatic way to determine if ngrok is already running on the port?

