Files
kurwa-strona/webserver
Bartłomiej Patyk e5e64b6dc8 quick fix 2
2025-10-22 19:05:25 +02:00
..
2025-10-22 19:05:25 +02:00
2025-10-22 19:05:25 +02:00
2025-10-22 19:05:25 +02:00
2025-10-22 19:05:25 +02:00
2025-10-22 19:05:25 +02:00
2025-10-22 19:05:25 +02:00

Simple Flask backend serving Access DB data for the web UI

Files added:

  • app.py - Flask app exposing /api/playcounts and static files under / (serves web/main.html and web/danebota.html)
  • web/data.js - fetches /api/playcounts and renders basic stats into the page
  • requirements.txt - minimal Python deps

Run (Windows PowerShell):

python -m venv .venv; .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python app.py

Notes:

  • This project expects the Access ODBC driver to be installed on Windows: "Microsoft Access Database Engine" or full Office with the Access components. If pyodbc fails to connect, install the Access Database Engine redistributable (search Microsoft Download Center for "AccessDatabaseEngine").
  • The Access file playcount.accdb must exist in the project root (next to app.py).
  • For production use, run behind a proper WSGI server and secure CORS instead of the permissive header used here for convenience.