development -> main #1

Open
Christopher.Hase wants to merge 93 commits from development into main
2 changed files with 10 additions and 7 deletions
Showing only changes of commit 1e04e6a295 - Show all commits

View file

@ -1,13 +1,16 @@
import { executeCommand } from './broker.js';
//import { executeCommand } from './broker.js';
function handleClick(): void {
console.log("Der Button wurde geklickt!");
alert("Hallo von TypeScript!");
//executeCommand();
fetch("/api/command", { method: "POST" })
/*fetch("/api/command", { method: "POST" })
.then(res => res.text())
.then(text => console.log("Server sagt:", text));
.then(text => console.log("Server sagt:", text));*/
fetch("https://192-168-197-2.c-one-infra.de/api/command", { method: "POST" })
.then(res => res.text())
.then(text => console.log("Server sagt:", text));
}
document.addEventListener("DOMContentLoaded", () => {

View file

@ -3,13 +3,13 @@ import express from 'express';
import { executeCommand } from './broker';
const app = express();
const port = 8080;
const port = 8090;
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}`);
});
app.listen(port, '0.0.0.0', () => {
console.log(`Server läuft auf http://0.0.0.0:${port}`);
});