iching-broker-level2/backend/server.ts
Christopher Hase 3c6d238ab8
All checks were successful
ci / build (push) Successful in 1m24s
add http-server part 7.6
2025-04-11 10:58:39 +02:00

14 lines
No EOL
348 B
TypeScript

import express from 'express';
import { executeCommand } from './broker.js';
const app = express();
const port = 8090; //TODO: OR 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}`);
});