15 lines
338 B
TypeScript
15 lines
338 B
TypeScript
|
// backend/server.ts
|
||
|
import express from 'express';
|
||
|
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, () => {
|
||
|
console.log(`Server läuft auf http://localhost:${port}`);
|
||
|
});
|