Files
2026-07-29 09:06:11 +07:00

870 B

AGENTS.md — mp4-viewer

Environment

  • Python 3.14 virtual environment at venv/
  • Activate: source venv/bin/activate

Commands

  • Install deps: source venv/bin/activate && pip install -r requirements.txt
  • Run: python app.py (reads .env via python-dotenv; override with env vars)
  • Test listing: curl http://127.0.0.1:5000/
  • Test video: curl -I http://127.0.0.1:5000/video/<filename>

Architecture

  • app.py — Flask entrypoint, routes, path validation
  • templates/ — Jinja2 HTML templates (index.html, play.html)
  • .env — default config (gitignored); .env.example checked in
  • MP4_VIEWER_DIR — single source dir for MP4s; all served paths validated with is_relative_to

Notes

  • venv/ is gitignored via its own .gitignore; keep it out of the repo root
  • .env is gitignored; copy .env.example to .env and edit