const express = require('express'); const path = require('path'); const app = express(); const PORT = process.env.PORT || 7860; // Serve static files app.use(express.static('public')); // Main route app.get('/', (req, res) => { res.sendFile(path.join(__dirname, 'public', 'index.html')); }); // Login route app.get('/login', (req, res) => { res.sendFile(path.join(__dirname, 'public', 'login.html')); }); // Register route app.get('/register', (req, res) => { res.sendFile(path.join(__dirname, 'public', 'register.html')); }); // Health check endpoint app.get('/health', (req, res) => { res.json({ status: 'ok', message: 'Server is running' }); }); app.listen(PORT, '0.0.0.0', () => { console.log(`Server is running on port ${PORT}`); });