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();
});*/
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');
});

View file

@ -1,10 +1,7 @@
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())
.then(text => console.log("Server sagt:", 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", {

View file

@ -29,6 +29,3 @@ spec:
- hosts:
- 192-168-197-2.c-one-infra.de
secretName: argocd-net-tls