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>
This commit is contained in:
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Flask==3.0.0
|
||||
mysql-connector-python==8.2.0
|
||||
Reference in New Issue
Block a user