iching-broker-level2/backend/server.ts
Christopher Hase fb6972b430
All checks were successful
ci / build (push) Successful in 1m7s
add http-server part 7.1
2025-04-11 09:44:00 +02:00

16 lines
No EOL
425 B
TypeScript

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