· NGSRV Team
How to share a Remix 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 npm run dev and tunneling it is faster.
Remix v2 with Vite uses port 3000 in most starters.
Steps
# 1. Start Remix
npm run dev
# 2. In another terminal, tunnel the port
ngsrv http 3000
Check vite.config.ts if the dev server complains about the hostname.
If the dev server blocks the public host
Same Vite host rules apply when Remix runs on the Vite dev server.
Reserve a URL that does not change
ngsrv http 3000 --subdomain remix-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: remix
port: 3000
subdomain: remix-preview
Then ngsrv run.