Skip to content

SpawnDock/dev-tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@spawn-dock/dev-tunnel

WebSocket tunnel client for SpawnDock local development preview. Exposes your local dev server through the SpawnDock control plane so others can preview your Telegram Mini App.

Install

npm install -g @spawn-dock/dev-tunnel

Or use with npx:

npx @spawn-dock/dev-tunnel

Usage

With spawndock.dev-tunnel.json (recommended)

If your project has a spawndock.dev-tunnel.json file (created by the bootstrap CLI), just run:

npx @spawn-dock/dev-tunnel

With CLI arguments

npx @spawn-dock/dev-tunnel \
  --control-plane http://your-server:3000 \
  --project-slug my-app \
  --device-secret your-device-secret \
  --port 3000

With environment variables

export SPAWNDOCK_CONTROL_PLANE=http://your-server:3000
export SPAWNDOCK_PROJECT_SLUG=my-app
export API_TOKEN=your-shared-api-token
export SPAWNDOCK_PORT=3000
npx @spawn-dock/dev-tunnel

API_TOKEN is the preferred auth mode for standalone package usage. SPAWNDOCK_DEVICE_SECRET remains supported for bootstrap-generated project credentials.

Configuration Priority

CLI arguments > Environment variables > spawndock.dev-tunnel.json > legacy spawndock.config.json

How it works

  1. Connects to the SpawnDock control plane via WebSocket
  2. Receives HTTP requests from users viewing your preview URL
  3. Proxies those requests to your local dev server
  4. Sends responses back through the tunnel

License

MIT

About

WebSocket tunnel client for SpawnDock local development preview

Resources

Stars

Watchers

Forks

Contributors