21 lines
No EOL
549 B
JavaScript
21 lines
No EOL
549 B
JavaScript
import express from 'express';
|
|
|
|
const app = express();
|
|
app.use(express.json());
|
|
|
|
// Simple health endpoint
|
|
app.get('/health', (req, res) => {
|
|
console.log('Health endpoint accessed');
|
|
res.json({ status: 'ok' });
|
|
});
|
|
|
|
// Simple catch-all to see what's happening
|
|
app.all('*', (req, res) => {
|
|
console.log(`Received request for ${req.path} with method ${req.method}`);
|
|
res.status(404).json({ error: 'Not found' });
|
|
});
|
|
|
|
const port = process.env.PORT || 3000;
|
|
app.listen(port, () => {
|
|
console.log(`Minimal server listening on port ${port}`);
|
|
}); |