- Add Next.js app structure with base configs, linting, and formatting - Implement LiveKit Meet page, types, and utility functions - Add Docker, Compose, and deployment scripts for backend and token server - Provide E2E and smoke test scaffolding with Puppeteer and Playwright helpers - Include CSS modules and global styles for UI - Add postMessage and studio integration utilities - Update package.json with dependencies and scripts for development and testing
1.4 KiB
1.4 KiB
AvanzaCast Token Server (dev)
Lightweight Express token server used by AvanzaCast for E2E/dev. It returns a random token and livekit URL, and can optionally store sessions in Redis.
Note: STUDIO_URL is optional — studio UI was migrated into broadcast-panel, so the frontend uses the token directly.
Running locally:
cd packages/token-server
npm install
npm run start
# server listens on http://localhost:4000
Docker build & run:
docker build -t avanzacast-token-server:dev .
# run with host networking so the container can reach host redis (Linux)
docker run --network host -e REDIS_URL=redis://127.0.0.1:6379 -e ALLOWED_ORIGINS=https://avanzacast-broadcastpanel.bfzqqk.easypanel.host -e LIVEKIT_WS_URL=wss://livekit-server.bfzqqk.easypanel.host avanzacast-token-server:dev
Docker compose (host network):
cd packages/token-server
docker-compose up --build -d
Environment variables:
- ALLOWED_ORIGINS (comma separated) - default: https://avanzacast-broadcastpanel.bfzqqk.easypanel.host
- LIVEKIT_WS_URL - livekit websocket url
- REDIS_URL - redis url (default redis://127.0.0.1:6379)
- PORT - listening port (default 4000)
Redis usage
- If
REDIS_URLis provided and accessible, token sessions will be stored under keysession:<token>with TTL (default 3600s). - If Redis is not available, server still returns tokens but does not store sessions.