This repo contains several examples of JVM-Microframeworks (e.g. Micronaut, Javalin, http4k, Ktor, Spring Fu, Spark, ...) written in Kotlin accessing a MongoDB.
All examples have this scenario in common:
This means they contain a Footballmanager microservice which accesses a MongoDB and provides the data via REST/JSON.
The MongoDB should be running on mongodb://localhost:27017
and have a database footballmanager
.
Within this database a collection footballer
should provide documents of this kind:
{
"_id" : ObjectId("5cc2d46f8735870692375404"),
"firstName" : "Manuel",
"lastName" : "Neuer",
"position" : "Goalkeeper"
}
{
"_id" : ObjectId("5cc2d4a08735870692375405"),
"firstName" : "Antonio",
"lastName" : "Rüdiger",
"position" : "Defence"
}
{
"_id" : ObjectId("5cc2d4c98735870692375406"),
"firstName" : "Toni",
"lastName" : "Kroos",
"position" : "Midfield"
}
{
"_id" : ObjectId("5cc2d5118735870692375407"),
"firstName" : "Leroy",
"lastName" : "Sane",
"position" : "Striker"
}
- See http4k-mongodb