add http-server part 8.1
This commit is contained in:
parent
05d0522a04
commit
173c444c62
6 changed files with 61 additions and 14 deletions
|
@ -77,7 +77,7 @@ async function sendEmail(content: string) {
|
|||
html: html(content)
|
||||
});
|
||||
|
||||
console.log("E-Mail sent: ", info.messageId);
|
||||
console.log("E-Mail sent: ", info.messageId + "\n");
|
||||
} catch (error) {
|
||||
console.error("Error Sending E-Mail:", error);
|
||||
}
|
||||
|
|
|
@ -2,16 +2,10 @@
|
|||
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("http://localhost:8090/api/command", {
|
||||
//fetch("/api/command", {
|
||||
fetch("http://192-168-197-2.c-one-infra.de:8090/api/command", {
|
||||
method: "POST"
|
||||
/*,
|
||||
headers: {
|
||||
"Content-Type": "application/json", // Füge dies hinzu, wenn du JSON sendest
|
||||
}*/
|
||||
})
|
||||
fetch("/iching/api/command", { method: "POST" })
|
||||
.then(res => res.text())
|
||||
.then(text => console.log("Server sagt:", text))
|
||||
.catch(error => console.error("Fehler:", error));
|
||||
|
@ -22,6 +16,10 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
button?.addEventListener("click", handleClick);
|
||||
});
|
||||
|
||||
|
||||
//fetch("http://localhost:8090/api/command", {
|
||||
//fetch("/api/command", {
|
||||
|
||||
/*fetch("/api/command", { method: "POST" })
|
||||
.then(res => res.text())
|
||||
.then(text => console.log("Server sagt:", text));*/
|
||||
|
|
14
ingress.yaml
14
ingress.yaml
|
@ -11,8 +11,15 @@ spec:
|
|||
- host: 192-168-197-2.c-one-infra.de
|
||||
http:
|
||||
paths:
|
||||
- path: /iching/api(/|$)(.*)
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: iching-service
|
||||
port:
|
||||
number: 81
|
||||
- path: /iching(/|$)(.*)
|
||||
pathType: ImplementationSpecific
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: iching-service
|
||||
|
@ -21,4 +28,7 @@ spec:
|
|||
tls:
|
||||
- hosts:
|
||||
- 192-168-197-2.c-one-infra.de
|
||||
secretName: argocd-net-tls
|
||||
secretName: argocd-net-tls
|
||||
|
||||
|
||||
|
||||
|
|
24
old.ingress.yaml
Normal file
24
old.ingress.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: iching-ingress
|
||||
namespace: argocd
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: 192-168-197-2.c-one-infra.de
|
||||
http:
|
||||
paths:
|
||||
- path: /iching(/|$)(.*)
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: iching-service
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- 192-168-197-2.c-one-infra.de
|
||||
secretName: argocd-net-tls
|
13
old.service.yaml
Normal file
13
old.service.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: iching-service
|
||||
namespace: argocd
|
||||
spec:
|
||||
selector:
|
||||
app: iching-broker
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
type: ClusterIP
|
|
@ -7,7 +7,9 @@ spec:
|
|||
selector:
|
||||
app: iching-broker
|
||||
ports:
|
||||
- protocol: TCP
|
||||
- name: frontend
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
type: ClusterIP
|
||||
- name: backend
|
||||
port: 81
|
||||
targetPort: 8090
|
Loading…
Reference in a new issue