const express = require('express');
const app = express();
const PORT = 5001;

app.get('/', (req, res) => res.send('Hello'));

const server = app.listen(PORT, () => {
    console.log(`Debug server running on port ${PORT}`);
    console.log('Press Ctrl+C to stop');
});

// Clean up on exit
process.on('SIGTERM', () => {
    server.close(() => {
        console.log('Process terminated');
    });
});
