Dominik wuttke
09/11/2020, 9:00 PMenvironment.config.property("path.variablename").getString()
-When i start my application with -PORT it starts with the defaultport, when I start it with -port (lowercase) it starts with the set port.
In both cases I can't access the variable with
environment.config.property("path.variablename").getString()
-When set a variable in the application.conf I can access it on runtime, but not when i need to start the server with a variable.
-ktor reads the data with which it was started and creates an application environment, but it was not clear for me how this is done. In the sourcecode
ktor reads all variables submitted at start which began with -P: and creates a property from it. My current solution is to submit the needed variables with -P:varname=varvalue and retrieve them with
environment.config.property("varname").getString()
Can someone explain to me how to do it the way ktor was intended to start with set environment variables and point out my mistake when trying to access the environment variables?
I use IntelliJ IDEA and passed my values as program arguments in the run/debug configuration