2025-04-09 13:47:06 +00:00
|
|
|
import express from 'express';
|
2025-04-10 09:41:51 +00:00
|
|
|
import { executeCommand } from './broker.js';
|
2025-04-09 13:47:06 +00:00
|
|
|
|
|
|
|
const app = express();
|
2025-04-09 15:00:35 +00:00
|
|
|
const port = 8080;
|
2025-04-09 13:47:06 +00:00
|
|
|
|
|
|
|
app.post('/api/command', (req, res) => {
|
|
|
|
executeCommand();
|
|
|
|
res.status(200).send('Command executed');
|
|
|
|
});
|
|
|
|
|
2025-04-09 14:51:26 +00:00
|
|
|
app.listen(port, '0.0.0.0', () => {
|
|
|
|
console.log(`Server läuft auf http://0.0.0.0:${port}`);
|
2025-04-10 06:57:08 +00:00
|
|
|
});
|