⬡ BACKEND INTEGRATION — Node.js / Express + MongoDB
Connect to your API by replacing the mock handlers below.
Register endpoint: POST /api/auth/register
Body: { username, email, password }
→ Hash password with bcrypt, save user to MongoDB.
Login endpoint: POST /api/auth/login
Body: { email, password }
→ Verify hash, return JWT token.
MongoDB schema example in models/User.js — see the README.