I’m trying to set up a Ktor server. When I copy an...
# ktor
a
I’m trying to set up a Ktor server. When I copy and paste the example for configuration in code, IntelliJ gives a warning that I don’t really understand.
EmbeddedServer should reference top level Application module extension
IntelliJ provides a quick-fix, but this prevents me from passing in any arguments to the configuration function. I want to configure the Ktor server using main args 🧵, but I can’t see how to do that without this warning. Any ideas?
Kotlin/JVM 1.8, Ktor 2.2.4
it looks like the way to pass in an arg to the module config is to use a custom env?
a
You can also disable this inspection or pass arguments to your module method explicitly. I’ve commented in https://youtrack.jetbrains.com/issue/KTOR-5696.
👍 1