Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bitxon/kotlin-ktor

Ktor Microservice Example
https://github.com/bitxon/kotlin-ktor

exposed flyway koin kotlin ktor postgres

Last synced: 2 days ago
JSON representation

Ktor Microservice Example

Awesome Lists containing this project

README

        

# Ktor Microservice

## Run application

Run application with embedded h2 database
```shell
./gradlew run
```

Run application with postgres database
```shell
docker compose up -d
```
```shell
ENV=dev ./gradlew run
```

## Test application

Create Account

```shell
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

```shell
curl --location 'http://localhost:8080/accounts'
```

Get Account By Id

```shell
curl --location 'http://localhost:8080/accounts/1'
```