Is it possible to run Ktor in development mode fro...
# ktor
h
Is it possible to run Ktor in development mode from Gradle and provide a .env file?
I've only been able to do it from the IntelliJ runner
h
Copy code
ktor {
    development = true
    development = ${?DEVELOPMENT}
    deployment {
        port = 8080
        port = ${?PORT}
        watch = [ classes, resources ]
    }
    application {
        modules = [ server.BackendKt.module ]
    }
}
h
That doesn't make it read the .env file.
h
this references .env file vars
that’s how my docker feeds the vars in the conf
h
I have the exact same section in my application.conf (except for the modules part) and it does not read the .env file
How do run the app with gradle?
a
Unfortunately, neither the Ktor plugin nor Gradle (https://github.com/gradle/gradle/issues/24976) read the
.env
files.
đŸ˜• 1
h
oh my bad, i am using the https://github.com/cdimascio/dotenv-kotlin sorry for misguiding you
h
@Aleksei Tirman [JB] That's unfortunate, but thanks for confirming.