A toy project to play around with Vert.x. This application demonstrates how you can build a non-blocking REST api server.
Concept: It’s a simple api where users can claim prime numbers. Their username is associated with each prime they claim.
This application was generated using http://start.vertx.io
To launch your tests:
./mvnw clean test
To package the application:
./mvnw clean package
To run the application:
java -jar target/primeclaim-1.0.0-SNAPSHOT-fat.jar -conf $(pwd)/primeclaim.conf
or
./mvnw clean compile exec:java
but first you will need some preparation:
docker run -d --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword postgres
mvn flyway:migrate -Dflyway.url=jdbc:postgresql://localhost/postgres -Dflyway.user=postgres -Dflyway.password=mysecretpassword
To build and push a docker image:
export DOCKERHUB_USERNAME=...
export DOCKERHUB_PASSWORD=...
mvn compile jib:build