Required variables
These environment variables must be set for the application to work:PostgreSQL database connection string. This is used to connect to the database where VODs and alerts are stored.Format:
postgresql://username:password@host:port/databaseExample: postgresql://user:password@localhost:5432/kommtkevinonlineSource: Configured in nuxt.config.ts:22 as runtimeConfig.app.postgresUrl and used in server/db.ts:7Your Twitch application client ID. Required for authenticating with the Twitch API to fetch stream status and VOD information.Source: Used in
server/api/twitch/stream/[id].ts:14,26,37 for Twitch API authenticationYour Twitch application client secret. Used together with the client ID to obtain OAuth tokens for Twitch API requests.Source: Used in
server/api/twitch/stream/[id].ts:15 for obtaining access tokensTo get Twitch API credentials:
- Go to the Twitch Developer Console
- Register a new application
- Set the OAuth Redirect URL (e.g.,
http://localhost:3000/auth/callbackfor local development) - Copy the Client ID and generate a Client Secret
Optional variables
The port number on which the application will listen for incoming requests.Example:
PORT=8080Source: Configured in Dockerfile:5,19 as a build argument and environment variableBase URL for authentication and overlay generation services. Used when generating thumbnails with overlays.Example:
AUTH_ORIGIN=https://kommtkevinonline.deSource: Used in server/api/thumbnail/generate.ts:18 for fetching overlay imagesConfiguration in different environments
Development
Create a.env file in the root of your project:
Docker
Pass environment variables using the-e flag or an env file: