const http = require('http');

const server = http.createServer((req, res) => {
    if (req.url === '/api/meals') {
        res.writeHead(200, { 'Content-Type': 'application/json' });
        res.end(JSON.stringify([{ dish: "Πίτσα" }]));
    } else {
        res.writeHead(404);
        res.end("Page not found");
    }
});

server.listen(3000, () => console.log("Ο Server ακούει στη θύρα 3000"));