...
Make sure you are in the folder
c:\work\react_app_calculator
Run
docker-compose up
Wait until no more messages are being sent to the screen
Open another terminal window (the plus symbol next to the title of the current terminal window)
Run
docker ps -a
, look at the services that are running. You should notice that there are two services; one is calledvatc-fe
, and the other is calledvatc-service
Examine the other fields that are displayed from the
docker ps -a
commandIn your browser enter the URL
localhost:30003001
, when the app is running select the Sales menu option, and you should see some dataIn your browser enter the URL
localhost:8080/api/v1/vatentries
, you should see the same data from when you select the Sales optionFrom the terminal run
docker stop vatc-service
In your browser enter the URL
localhost:8080/api/v1/vatentries
, you should see no data, this is because we have stopped the backend serverIn your browser enter the URL
localhost:30003001
, when the app is running select the Sales menu option, and you should see no data, this is because the frontend runs as a separate service to the backend, we have isolated each service from the other.From the terminal run docker start vatc-service
In your browser enter the URL
localhost:8080/api/v1/vatentries
, you should see the same data from when you select the Sales optionFrom the terminal run
docker stop vatc-fe
In your browser enter the URL
localhost:30003001
, it should fail to connect to the applicationIn your browser enter the URL
localhost:8080/api/v1/vatentries
, you should see the same data from when you select the Sales option, so you can still access the data even though the frontend has been stopped
...