wannpassts/backend/.env.example

37 lines
1.7 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ─── WannPassts Backend Konfiguration ────────────────────────────────────────
# Diese Datei nach backend/.env kopieren und anpassen.
# HTTP-Port des Backends
PORT=8080
# SQLite-Datenbankdatei (relativ zum backend-Verzeichnis)
DB_PATH=wannpassts.db
# Öffentliche URL des Backends. Wichtig für:
# - Google-OAuth-Redirect: {APP_URL}/api/calendars/google/callback
# - Umleitung nach erfolgreichem Google-Login (sofern FRONTEND_URL leer)
APP_URL=http://localhost:8080
# URL des Frontends optional! Leer/unset = es wird APP_URL verwendet
# (Single-Origin, z. B. Docker). Nur setzen, wenn das Frontend getrennt läuft
# (Dev: Vite auf http://localhost:5173).
FRONTEND_URL=
# Statische Secrets in Produktion zwingend setzen (z. B. `openssl rand -hex 32`)
# JWT_SECRET sichert Logins, ENCRYPTION_KEY verschlüsselt gespeicherte Kalender-Tokens.
JWT_SECRET=
ENCRYPTION_KEY=
# ─── Google Kalender (OAuth) ─────────────────────────────────────────────────
# 1. https://console.cloud.google.com → Projekt anlegen
# 2. APIs & Services → „Google Calendar API“ aktivieren
# 3. OAuth-Zustimmungsbildschirm: External, Scope calendar.readonly
# 4. Credentials → OAuth-Client-ID (Webanwendung)
# Autorisierte Redirect-URI: {APP_URL}/api/calendars/google/callback
# (lokal also http://localhost:8080/api/calendars/google/callback)
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# ─── Optional: Frontend-Build direkt ausliefern (Produktion) ────────────────
# cd frontend && npm run build → STATIC_DIR=../frontend/dist
STATIC_DIR=