https://kotlinlang.org logo
Title
j

Jacob Richards

09/15/2019, 5:42 PM
Hey folks! Building a server with Ktor connected to a Postgres DB, and I am also planning to integrate Dagger for DI later on- does anyone know of any good resources/tutorials for Dagger + Kotlin (or, more specifically, Dagger with Ktor)? ALSO, I’m looking to learn Dropwizard with Kotlin- anyone know of any good resources for that as well?
t

tddmonkey

09/15/2019, 6:26 PM
DW with Kotlin -just use the standard Java documentation. You’ll just need to add the Jackson
KotlinModule
to your bootstrap
j

Jacob Richards

09/15/2019, 9:48 PM
Ah i see- I’m not familiar with Java, so how should I go about reading the DW docs? I’ve found it quite confusing, and I don’t really understand how to start (I’d have to translate all of the code in the docs to kotlin, which I don’t know how to do)
g

gildor

09/16/2019, 12:12 AM
You can use autovonverter from Java to Kotlin. Also if you Google "dropwizard Kotlin" there are samples and articles
j

Jacob Richards

09/16/2019, 12:27 AM
ah interesting idea! i did google it, but the articles are either not helpful or too simple of examples. i’m trying to understand how i’d do DB access & deal with JSON with DW. it’s pretty simple with ktor, but with the DW example I was following (https://dev.to/tagmg/step-by-step-guide-to-building-web-api-with-kotlin-and-dropwizard) it pretty much stopped at a simple API endpoint that sends back numbers.