2025-04-09 13:47:06 +00:00
|
|
|
// backend/server.ts
|
|
|
|
import express from 'express';
|
|
|
|
import { executeCommand } from './broker';
|
|
|
|
|
|
|
|
const app = express();
|
2025-04-09 14:51:26 +00:00
|
|
|
const port = 8090;
|
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}`);
|
|
|
|
});
|