iching-broker-level2/dist/backend/server.js
Christopher Hase c0f1a3db7e
Some checks are pending
ci / build (push) Waiting to run
add http-server part 6.2
2025-04-10 14:36:39 +02:00

11 lines
334 B
JavaScript

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