12 lines
334 B
JavaScript
12 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}`);
|
||
|
});
|