From acdeb23c9235973da00ae314421500a8b24ba9dd Mon Sep 17 00:00:00 2001 From: Christopher Hase Date: Fri, 11 Apr 2025 11:05:48 +0200 Subject: [PATCH] add http-server part 7.7 --- frontend/event.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/event.ts b/frontend/event.ts index e776c78..21b0409 100644 --- a/frontend/event.ts +++ b/frontend/event.ts @@ -3,9 +3,13 @@ function handleClick(): void { console.log("Der Button wurde geklickt!"); alert("Hallo von TypeScript!"); - fetch("/api/command", { method: "POST" }) + fetch("http://localhost:8090/api/command", { method: "POST" }) .then(res => res.text()) .then(text => console.log("Server sagt:", text)); + + /*fetch("/api/command", { method: "POST" }) + .then(res => res.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())