add http-server part 8.2

This commit is contained in:
Christopher Hase 2025-04-14 10:32:34 +02:00
parent 173c444c62
commit 9f82926037
3 changed files with 7 additions and 8 deletions

View file

@ -27,7 +27,9 @@ app.use((req, res, next) => {
next(); next();
});*/ });*/
app.post('/api/command', (req, res) => { //app.post('/api/command', (req, res) => {
app.post('/command', (req, res) => {
executeCommand(); executeCommand();
res.status(200).send('Command executed\n'); res.status(200).send('Command executed\n');
}); });

View file

@ -1,9 +1,6 @@
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!");
//fetch("http://192-168-197-2.c-one-infra.de:8090/api/command", { method: "POST" })
fetch("/iching/api/command", { method: "POST" }) fetch("/iching/api/command", { method: "POST" })
.then(res => res.text()) .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("http://localhost:8090/api/command", {
//fetch("/api/command", { //fetch("/api/command", {

View file

@ -28,7 +28,4 @@ spec:
tls: tls:
- hosts: - hosts:
- 192-168-197-2.c-one-infra.de - 192-168-197-2.c-one-infra.de
secretName: argocd-net-tls secretName: argocd-net-tls