Hey guys! I have a server application with standar...
# server
k
Hey guys! I have a server application with standard KTOR configuration (generated with Ktor Project Generator). I wish to configure different build configurations. Here the primary interest is that i can add command line arguments for expose (dbName, password, etc), port, produktion checks, etc. I was not able to find any official documentation regarding that. Has any one accomplished that? Or know how i can do that
a
Not a solution but a hint: In the generated application.conf you can see the following part:
Copy code
deployment {
    port = 8080
    port = ${?PORT}
  }
The PORT variable comes from the environment. So you could launch it like this:
Copy code
$ export PORT=9000; java -jar your-ktor-app.jar
So you can create a similar configuration part for the database parameters and set those using the environment variables.
👍 1