iching-broker-level2/backend/server.ts
Christopher Hase 86c5e96aef
All checks were successful
ci / build (push) Successful in 1m5s
add http-server part 6.5
2025-04-10 15:57:16 +02:00

16 lines
No EOL
377 B
TypeScript

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