This is a simple server application which implements a simple CRUD service with Postgres as a backend and reactive API, built on the basis of Vert.x framework
Demonstrates the using of the following technologies:
-
Apache Kafka as a source of data to persist
-
Exposing public end points to access the data saved in the database
-
Test containers for integration tests
public api:
Method | Endpoint | Secure | Description |
---|---|---|---|
GET | /deviceId/total | No | value of counter for specific device |
GET | /deviceId/year/month | No | value of counter for specific month on device |
GET | /deviceId/year/month/day | No | value of counter for specific day on device |
To launch your tests:
mvn clean test
To package your application:
mvn clean package
To run your application:
java -cp ./target/vxcore-1.0.0-SNAPSHOT-fat.jar verticle.StepServer
Run all containers, then create a record in step
table with device_id=1
Perform the GET request to the following endpoint:
GET http://localhost:3001/1/total
{"count":123}