· NGSRV Team
How to share a Express 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 node server.js and tunneling it is faster.
Any port works. Point ngsrv at whatever app.listen() uses.
Steps
# 1. Start Express
node server.js
# 2. In another terminal, tunnel the port
ngsrv http 3000
Most setups work without extra config.
Reserve a URL that does not change
ngsrv http 3000 --subdomain express-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: express
port: 3000
subdomain: express-preview
Then ngsrv run.