1 Commits

Author SHA1 Message Date
cproudlock
fbe5312e7b Feature: Convert from Node.js/Express to Python/Flask
BREAKING CHANGE: Replaced Node.js backend with Python Flask

Reason: npm not available on production server, Python/pip is available.

Changes:
- Created app.py (Flask) to replace server.js (Node.js)
- Created requirements.txt with only 2 dependencies (Flask, mysql-connector-python)
- Updated README.md with Flask installation and deployment instructions
- Maintained all existing functionality:
  * Same API endpoints (/api/notifications, /health)
  * Same database queries (isshopfloor filter, 72-hour window)
  * Same priority sorting (incidents first)
  * Serves static files from public/ directory
  * Same environment variable configuration

Dependencies:
- Flask==3.0.0
- mysql-connector-python==8.2.0

The public/index.html frontend remains unchanged - only the backend was converted.

Tested and verified:
- API endpoint returns correct data
- Health check responds
- Dashboard displays properly
- Database connectivity working
- PM2 process manager compatible

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 11:52:34 -04:00