mirror of
https://github.com/LukeHagar/relay.git
synced 2025-12-06 04:21:14 +00:00
Baton SvelteKit App (Svelte 5, SvelteKit 2, Tailwind 4)
This app integrates a webhook ingest with a WebSocket relay.
Scripts:
- dev: vite dev
- build: vite build
- preview: vite preview
Environment:
- Copy
.env.exampleto.envand fill values.
WebSockets:
- WS server runs separately (default ws://localhost:4210)
- Client fetches
/api/ws-tokento obtain a short-lived JWT - Connects with
ws://host:WS_PORT/?token=...
Ingest:
- POST any webhook to
https://{subdomain}.your-host/ingest. - Event is stored in
WebhookEventand broadcast to connected clients for that subdomain.