feat: add simple Express app with /hello endpoint and tests

This commit is contained in:
coaxial
2025-10-23 15:14:23 +02:00
committed by coaxial (aider)
parent 928c1afacd
commit 8bf16b0ac2
5 changed files with 63 additions and 0 deletions

17
src/server.js Normal file
View File

@@ -0,0 +1,17 @@
const express = require('express');
const { getGreeting } = require('./greeting');
const app = express();
const PORT = process.env.PORT || 3000;
app.get('/hello', (req, res) => {
res.send(getGreeting());
});
if (require.main === module) {
app.listen(PORT, () => {
console.log(`Server listening on port ${PORT}`);
});
}
module.exports = app;