Setup a Tunneling Solution (for local dev)
This guide walks you through setting up a Tunneling solution for local development.
To test locally, you need to install a tunnel solution to get an external url
Option 1: Using localtunnel
Install
npm install -g localtunnel
Start
Assuming supervaizer server runs on port 8000 (which it does by default)
lt --port 8000
# your url is: https://silly-peaches-chapter.loca.lt
# or optionally, set your own subdomain (if available)
lt --port 8000 --subdomain my_supervaizer_agent
# your url is: https://my_supervaizer_agent.loca.lt
Keep track of your url
Make note of the host name (without http://
) : my_supervaizer_agent.loca.lt
and store it in the SUPERVAIZER_HOST
environment variable.
Option 2: Using ngrok
Installation
- macOS
- Windows
- Linux (apt)
brew install ngrok
Install via the Windows App Store
curl -sSL 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 bookworm main" \
| sudo tee /etc/apt/sources.list.d/ngrok.list \
&& sudo apt update \
&& sudo apt install ngrok
Setup & Deploy
Sign up to grok (free with limitations) to get a token
Configure
ngrok config add-authtoken <token>
Run
ngrok http 8000
# Or -optionally try to set the url (paid plans)
ngrok http 8000 --url my_supervaizer_agent.ngrok.dev
Ngrok Running
Update update available (version 3.26.0, Ctrl-U to update)
Version 3.22.1
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding https://e83bc6b8acec.ngrok-free.app -> http://localhost:8000
Keep track of your url
Make note of the host name (without http:/
) : my_supervaizer_agent.ngrok.dev
and store it in the SUPERVAIZER_HOST
environment variable.