Migrate database from MySQL to Supabase PostgreSQL

- Added @supabase/supabase-js client library
- Rewrote database.js to use Supabase API
- Updated server.js health check for Supabase
- Updated db.config.example.js with Supabase format
- Created comprehensive SUPABASE_SETUP.md guide
- Added SQL schema files for easy deployment
- Updated README_DB_CONFIG.md for Supabase

Benefits:
- Managed PostgreSQL database
- Built-in Row Level Security
- Real-time capabilities
- Easy monitoring via dashboard
- Free tier for development
This commit is contained in:
2025-12-21 15:40:57 +11:00
parent 5238fc8d22
commit 054cbf3e77
9 changed files with 872 additions and 276 deletions

View File

@@ -20,6 +20,7 @@
"express": "^4.18.2",
"socket.io": "^4.6.1",
"mysql2": "^3.6.5",
"@supabase/supabase-js": "^2.39.0",
"bad-words": "^3.0.4",
"cors": "^2.8.5"
},