add http-server part 8.5
All checks were successful
ci / build (push) Successful in 2m36s

This commit is contained in:
Christopher Hase 2025-04-14 13:23:02 +02:00
parent 2cf73e1cb2
commit 43d4514bc6
6 changed files with 81 additions and 64 deletions

View file

@ -19,11 +19,10 @@ It is also possible to configure the intervall of days between the sending of ho
The app can be deployed by running:
```bash
$ kubectl apply -f ingress.yaml
$ kubectl apply -f service.yaml
$ kubectl apply -f deployment.yaml
```
This will start the deployment of the app in the pod, the service and an ingress for the HTTP frontend server and an ingress for the backend server.
When a pod with the app is initally started, one email will be sent to the configured receiver.
## Backend Server
@ -32,10 +31,12 @@ The backend server is running inside the pod on the address http://localhost:809
An E-Mail with an I-Ching horoscope (provided by the library app) will be sent to the configured email address.
The backend server can be tested from inside the pod by calling 'curl -X POST http://localhost:8090/iching/api/command' from the console.
The backend server has a separate ingress, so API requests can get forwarded to the backend. Also the backend does not need 'rewrite target'.
## HTTP Server
The frontend server is running inside the pod on the address http://localhost:8080/iching. It provides an HTML homepage with a button. Upon pressing the button, the backend server will be called (to send an E-Mail).
The frontend server has a separate ingress from the backend server, since the frontend server needs the 'rewrite target' annotation: So the Frontend is not running in the root folder but using the sub-path 'iching'.
<!--## Testing
The Jest unit tests can be run with