const express = require('express'); const app = express(); app.use(express.json()); app.use((req, res, next) => { const start = Date.now(); res.on('finish', () => { console.log(`${req.method} ${req.path} ${res.statusCode} ${Date.now() - start}ms`); }); next(); }); app.get('/health', (req, res) => { res.json({ status: 'ok', uptime: process.uptime(), connectedBackends: 0, }); }); module.exports = app;