Author: Nick Santos
Create public URLs for your local services with ngrok
bash
ngrok
- GNU core utils (
tr
,sort
) -brew install coreutils
When you include this extension, Tilt starts an ngrok server on port 4040 with no tunnels open by default.
Every service with a link or port-forward will have a new button labelled 'ngrok'.
Clicking the button will create a new tunnel. You can see all the currently open tunnels at http://localhost:4040/.
--auth=my-user:my-password
: Adds a basic auth prompt to all tunnels.
Default behavior:
v1alpha1.extension_repo(name='default', url='https://github.com/tilt-dev/tilt-extensions')
v1alpha1.extension(name='ngrok:config', repo_name='default', repo_path='ngrok')
With auth:
v1alpha1.extension_repo(name='default', url='https://github.com/tilt-dev/tilt-extensions')
v1alpha1.extension(
name='ngrok:config',
repo_name='default',
repo_path='ngrok',
args=['--auth=my-user:my-password'])
With auth from a file:
password = str(read_file(os.path.join(os.getenv('HOME'), '.ngrok-password'))).strip()
v1alpha1.extension_repo(name='default', url='https://github.com/tilt-dev/tilt-extensions')
v1alpha1.extension(
name='ngrok:config',
repo_name='default',
repo_path='ngrok',
args=['--auth=my-user:%s' % password])
Only create the ngrok option for certain services / disallow it from other services.
ngrok currently always starts on port 4040