add http-server part 8.2
This commit is contained in:
parent
173c444c62
commit
9f82926037
3 changed files with 7 additions and 8 deletions
|
@ -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');
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
|
|
||||||
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())
|
||||||
.then(text => console.log("Server sagt:", 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("http://localhost:8090/api/command", {
|
||||||
//fetch("/api/command", {
|
//fetch("/api/command", {
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,3 @@ spec:
|
||||||
- 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue