Skip to content

Static hosting

The browser output is a static ESM bundle. Serve the output together with its HTML, CSS, and other assets from an HTTP(S) static host; do not open it from a file: URL for production use. A local example is:

npm run watershed:build
cd examples/watershed/web
python3 -m http.server 8080

For a deployed client, serve over HTTPS and proxy the WebSocket endpoint with the matching wss: URL. The Watershed deployment example uses nginx for static files and /ws proxying to a Node relay. Configure compression and cache headers for generated assets according to the host; sourcemaps may be kept private if their source disclosure is undesirable.

Static hosting does not supply WebSocket proxying, TURN, authentication, or CRDT persistence. Those are separate deployment concerns.