iching-broker-level2/backend/server.ts
Christopher Hase 325f961a99
Some checks failed
ci / build (push) Has been cancelled
add http-server part 6.1.4
2025-04-10 11:41:51 +02:00

14 lines
No EOL
331 B
TypeScript

import express from 'express';
import { executeCommand } from './broker.js';
const app = express();
const port = 8080;
app.post('/api/command', (req, res) => {
executeCommand();
res.status(200).send('Command executed');
});
app.listen(port, '0.0.0.0', () => {
console.log(`Server läuft auf http://0.0.0.0:${port}`);
});