Ngrok is a service that will proxy a locally-running server to the Internet where any coworker, friend, or client with a browser can view the local site site you have running. Use this to demo a new site or ask a friend to look at an error for you. This is also great for testing integration with 3rd party systems (like Stripe webhooks) while still developing on localhost!
Use the commands that come with this module to start and stop Ngrok shares.
server share start
# or
share
It will:
- Start the CommandBox server if it is not already running.
- Start Ngrok using the embedded binaries for your platform.
- Stop any currently open Ngrok tunnels (since the free version only allows one at a time).
- Create the new Ngrok tunnel.
- Display the share url.
- Open the share url in the browser.
server share stop
# or
unshare
If you stop a server that is being shared, the Ngrok tunnel will be closed for you.