Skip to content

bitxon/kotlin-ktor

Repository files navigation

Ktor Microservice

Run application

Run application with embedded h2 database

./gradlew run

Run application with postgres database

docker compose up -d
ENV=dev ./gradlew run

Test application

Create Account
curl --location 'http://localhost:8080/accounts' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "firstName": "Mike",
    "lastName": "Brown",
    "dateOfBirth": "2000-03-17",
    "currency": "EUR",
    "moneyAmount": 78
}'
Get All Accounts
curl --location 'http://localhost:8080/accounts'
Get Account By Id
curl --location 'http://localhost:8080/accounts/1'