add http-server part 5.11.1
All checks were successful
ci / build (push) Successful in 1m8s

This commit is contained in:
Christopher Hase 2025-04-09 17:00:35 +02:00
parent 1e04e6a295
commit 21cbfb31c9
2 changed files with 1 additions and 3 deletions

View file

@ -1,10 +1,8 @@
//import { executeCommand } from './broker.js';
function handleClick(): void { function handleClick(): void {
console.log("Der Button wurde geklickt!"); console.log("Der Button wurde geklickt!");
alert("Hallo von TypeScript!"); alert("Hallo von TypeScript!");
//executeCommand();
/*fetch("/api/command", { method: "POST" }) /*fetch("/api/command", { method: "POST" })
.then(res => res.text()) .then(res => res.text())
.then(text => console.log("Server sagt:", text));*/ .then(text => console.log("Server sagt:", text));*/

View file

@ -3,7 +3,7 @@ import express from 'express';
import { executeCommand } from './broker'; import { executeCommand } from './broker';
const app = express(); const app = express();
const port = 8090; const port = 8080;
app.post('/api/command', (req, res) => { app.post('/api/command', (req, res) => {
executeCommand(); executeCommand();