I just created a project with Ktor but my changes ...
# ktor
a
I just created a project with Ktor but my changes are not auto reloading unless I rerun the app on IntelliJ. Is there auto-reload out of the box?
b
Auto reload only happens when you recompile your kt files as it's only reloading .class files. You need a separate continuous kotlin compilation running in the background
a
Is there a way to enable that on IntelliJ? The continuous compilation?
b
No, it's gradle feature (google around)
a
okay thank s
r
Note that development mode needs to be on for this. Keeping with 12 factor and wanting to use
application.conf
without separate files for different envs, removing the development line from that conf and adding the following worked well:
Copy code
application {
    mainClass.set("io.ktor.server.cio.EngineMain")

    if (System.getenv("KTOR_ENV") == "development") {
        applicationDefaultJvmArgs = listOf("-Dio.ktor.development=true")
    }
}
🙏 1
a
Thanks @Rescribet