Copyright 2023 Michal Zeman, zeman.michal@yahoo.com
Licensed under the Creative Commons Attribution (CC BY) license. You are free to share, copy, distribute, and adapt this work, provided you give appropriate credit to the original author Michal Zeman, zeman.michal@yahoo.com.
To view a copy of the license, visit https://creativecommons.org/licenses/by/4.0/
This demo is based on:
There are services:
1) From to root directory, execute the build with skipped tests
./mvnw clean install -DskipTests
./docker
dir. execute
docker-compose -f docker-compose.yml -f docker-compose-api-gateway.yml -f docker-compose-shortener-service.yml -f docker-compose-statistic-service.yml -f docker-compose-user-service.yml up -d
3) For the verification of running services, use CURL commands
curl --request POST \
--url http://localhost:8080/users \
--header 'Content-Type: application/json' \
--data '{
"firstName": "FirstNameTest",
"lastName": "LastNameTest"
}'
curl --request GET \
--url http://localhost:8080/users/
curl --request PUT \
--url http://localhost:8080/users/[user_id]/contactinformation \
--header 'Content-Type: application/json' \
--data '{
"email": "test@email.com",
"phoneNumber": "+421999009001"
}'
curl --request GET \
--url http://localhost:8080/users/[user_id]
curl --request GET \
--url http://localhost:8080/statistics
curl --request POST \
--url http://localhost:8080/shorteners/ \
--header 'Content-Type: application/json' \
--data '{
"url":"https://www.reactivemanifesto.org",
"userId": "a6ed70a3-8f55-4513-acd0-96768a0e0e0c"
}
'
http://localhost:8080/shorteners/map/${shortener-key}
${shortener-key}
is an attribute you have received as a response body from the creation e.g. "key": "2be71aba-4ff5-45c5-a3bb-7287a69e7e9d",
You can check all events related to any action or changes done in the microservices user MS
and Shortener MS
via Statistic MS
with the following command:
curl --request GET \
--url http://localhost:8080/statistics
docker
directory, execute the following command to run Apache Kafka and other services:
docker compose -f docker-compose.yml up -d
./mvnw clean install