iching-broker-level2/backend/server.ts
Christopher Hase a7250ef323
All checks were successful
ci / build (push) Successful in 1m5s
add http-server part 6.1
2025-04-10 10:21:29 +02:00

15 lines
No EOL
349 B
TypeScript

// backend/server.ts
import express from 'express';
import { executeCommand } from './broker';
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}`);
});