· NGSRV Team
How to share a Flask dev server online
You finished a feature branch and someone off your machine needs to click through it. Deploying a staging build works, but it is slow. Running flask run and tunneling it is faster.
Flask's dev server is fine for demos and webhook testing. Use a proper WSGI server before real deploys.
Steps
# 1. Start Flask
flask run
# 2. In another terminal, tunnel the port
ngsrv http 5000
Most setups work without extra config.
Reserve a URL that does not change
ngsrv http 5000 --subdomain flask-preview
Hand that link to QA or a client. Same URL after you restart the tunnel.
Declarative config for teams
Check a ngsrv.yml into the repo so everyone runs the same tunnel names:
tunnels:
- name: flask
port: 5000
subdomain: flask-preview
Then ngsrv run.