Installation & Requirements
Don't want to install?
Try the playground at play.zwaggen.com — same app, no install. Cross-origin requests there hit browser CORS (no bundled proxy on the hosted page). Come back here when you want to test CORS-locked APIs or work fully offline.
Prerequisites
- Node.js ≥ 20. Check with
node --version. Install from nodejs.org or vianvm. - A modern browser. Chromium-based (Chrome, Edge, Brave, Arc) or current Firefox. Safari is unsupported — it lacks some of the
showOpenFilePicker/showSaveFilePickerAPIs the spec-versioning flow relies on; a fallback upload/download path works, but the file-handle flow does not.
Run Zwaggen
npx @zwaggen/webThat's it. npx downloads the published package, serves the pre-built SPA via sirv at http://127.0.0.1:4173, and opens the URL in your default browser.
Flags
npx @zwaggen/web --port 8080 # custom port
npx @zwaggen/web --host 0.0.0.0 # bind all interfaces (LAN access)
npx @zwaggen/web --no-open # don't auto-open browser
npx @zwaggen/web --no-proxy # disable the bundled CORS proxy
npx @zwaggen/web --help # show all optionsStop the server with Ctrl+C.
The startup log line Bundled CORS proxy: on (URL/proxy) confirms the bundled proxy is mounted; pass --no-proxy to skip it.
Run the CLI
npx @zwaggen/cli --help@zwaggen/cli is a companion tool for batch-running requests and diffing specs. See the CLI guide for details.
CORS proxy
The bundled CORS proxy ships with @zwaggen/web since v0.2.0 — it's mounted at /proxy on the same port as the SPA. Flip the "Use proxy" toggle on any endpoint and you're done — no separate install, no second terminal.
For setups where the proxy needs to live on a different host (e.g. running the SPA on a tablet that hits a proxy on your desktop), the standalone npx zwaggen-proxy is also available. See CORS Proxy for the full breakdown.
Troubleshooting
unsupported enginewarning on install — check Node ≥ 20 withnode --version.EADDRINUSE— port 4173 is taken. Usenpx @zwaggen/web --port <n>to pick another.showOpenFilePicker is not a function— you're on a browser without the File System Access API. Firefox is fine for in-memory use; for the "save to disk" file-handle flow, use a Chromium browser.- Browser didn't open — check for
npx @zwaggen/web --no-openin your shell history; without--no-open, the CLI auto-opens.