This project is for testing development with docker, kotlin, gradle, ktor and postgreSQL
- JDK 21
- Kotlin
- Gradle
- Docker
- Ktor
- Postgres
Make sure you have the Java JDK 21 installed You can check which version you have installed using this command:
java -version
Make sure you have the Docker installed You can check which version you have installed using this command:
docker --version
Make sure you have the Docker-compose installed You can check which version you have installed using this command:
docker-compose --version
To build locally and run the tests you can simply run
./gradlew shadowJar
or on windows gradlew.bat shadowJar
./gradlew run
Note You need to run a postgresSql db se #Running the postgresSql db from docker compose
docker compose up
docker compose down
For testing the endpoint ValidateDataApi
You need a tool to send a request and to inspect the repsonse
A tool you can use is Postman: https://www.postman.com/downloads/
The endpoint is currently available at http://0.0.0.0/v1/validate when running the application locally
Set the body in the request, example: {"data":"DATA"}
and profit
Example of a request:
`curl --location --request POST 'http://0.0.0.0:8080/v1/validate' \
--header 'Content-Type: application/json' \
--data-raw '{"data":"DATA"}'`
Example of a response:
{"result":"OK"}
Find the newest version of gradle here: https://gradle.org/releases/ Then run this command: (Remeber to repealce $gradleVersjon with newest version)
./gradlew wrapper --gradle-version $gradleVersjon
Want to add a feature? see CONTRIBUTING
This project is maintained by CODEOWNERS
Questions? please create an issue