Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bitxon/kotlin-ktor
- Owner: bitxon
- Created: 2024-01-28T11:02:52.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-11T19:57:00.000Z (3 months ago)
- Last Synced: 2024-11-08T05:04:38.469Z (about 2 months ago)
- Topics: exposed, flyway, koin, kotlin, ktor, postgres
- Language: Kotlin
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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'
```