From 9f82926037d8afc57d957e6c24e41d148e728684 Mon Sep 17 00:00:00 2001 From: Christopher Hase Date: Mon, 14 Apr 2025 10:32:34 +0200 Subject: [PATCH] add http-server part 8.2 --- backend/server.ts | 4 +++- frontend/event.ts | 6 +++--- ingress.yaml | 5 +---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/backend/server.ts b/backend/server.ts index 1201052..a5446b1 100644 --- a/backend/server.ts +++ b/backend/server.ts @@ -27,7 +27,9 @@ app.use((req, res, next) => { next(); });*/ -app.post('/api/command', (req, res) => { +//app.post('/api/command', (req, res) => { + +app.post('/command', (req, res) => { executeCommand(); res.status(200).send('Command executed\n'); }); diff --git a/frontend/event.ts b/frontend/event.ts index 6bf6399..e7f5fe5 100644 --- a/frontend/event.ts +++ b/frontend/event.ts @@ -1,9 +1,6 @@ - function handleClick(): void { console.log("Der Button wurde geklickt!"); alert("Hallo von TypeScript!"); - - //fetch("http://192-168-197-2.c-one-infra.de:8090/api/command", { method: "POST" }) fetch("/iching/api/command", { method: "POST" }) .then(res => res.text()) @@ -17,6 +14,9 @@ document.addEventListener("DOMContentLoaded", () => { }); + + //fetch("http://192-168-197-2.c-one-infra.de:8090/api/command", { method: "POST" }) + //fetch("http://localhost:8090/api/command", { //fetch("/api/command", { diff --git a/ingress.yaml b/ingress.yaml index 770129e..a1acb56 100644 --- a/ingress.yaml +++ b/ingress.yaml @@ -28,7 +28,4 @@ spec: tls: - hosts: - 192-168-197-2.c-one-infra.de - secretName: argocd-net-tls - - - + secretName: argocd-net-tls \ No newline at end of file