A microservice is designed to give information about current rate every 30 seconds
- Clone the project with
git clone https://github.com/katerina20/realtime-rate.git
- Go to the cloned project and build it with
./mvnw clean package
- Up it with
docker-compose up
- The endpoint to start receive the information is GET
http://localhost:8080/api/rate/
docker-compose down
stops the service.
The response is shown in such format:
Current: 31,20 Average: 31,10 Date: 20.11.2022 12:21:30
For the implementation Spring Boot is used. MongoDb is used as a database. Microservice makes a request to external API to save current rate every 2 seconds to calculate average day rate. External API: https://v6.exchangerate-api.com/