// Health check endpoint for frontend container // Import necessary modules import { createServer } from 'http'; // Create a simple server that responds to health check requests const server = createServer((req, res) => { // Only respond to /health path if (req.url === '/health') { res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ status: 'ok', timestamp: new Date().toISOString() })); } else { res.writeHead(404); res.end(); } }); // Listen on a separate port to avoid conflicts with the Next.js server server.listen(3001, () => { console.log('Health check server running on port 3001'); }); // Export for use in Next.js export default server;