Files
guyg1474andClaude Opus 5.5 dd58b3d1f8 P42 Dashboard: erster Stand
FastAPI-Backend und React-Frontend mit Konten, Sendungsverfolgung,
Projekt-Artikeln, Vorrat & Einkauf mit Rezeptabgleich, Reise-Weltkarte,
Kanban-Projekten mit Priorität, Server-Monitoring und den Designs
Matrix und Blackwall. Betrieb per Docker hinter nginx (siehe DEPLOY.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:08:11 +02:00

25 lines
750 B
Python

"""Lädt config.json (oder config.example.json) aus dem Projektordner."""
import json
import os
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
DATA_DIR = Path(os.environ.get("P42_DATA_DIR") or ROOT / "data")
FRONTEND_DIST = ROOT / "frontend" / "dist"
def _load() -> dict:
path = ROOT / "config.json"
if not path.exists():
path = ROOT / "config.example.json"
return json.loads(path.read_text(encoding="utf-8"))
config = _load()
PORT = int(config.get("port", 3000))
LINKS = config.get("links", {})
TRACKING = config.get("tracking", {})
# Wikimedia verlangt eine Kontaktangabe im User-Agent; leer = keine Wikipedia-Texte
WIKIPEDIA_CONTACT = (config.get("reisen") or {}).get("wikipediaKontakt", "").strip()