Does ktor provide a function to use application.ya...
# ktor
d
Does ktor provide a function to use application.yaml separately depending on the local, dev, and prod environments like spring boot?
Copy code
# application.yaml

spring:
  profiles:
    active: dev
  datasource:
    url: jdbc:<postgresql://dev-db.example.com:5432/myapp>
    username: dev_user
    password: dev_secret
spring:
  profiles:
    active: alpha
  datasource:
    url: jdbc:<postgresql://alpha-db.example.com:5432/myapp>
    username: alpha_user
    password: alpha_secret
Spring's configuration method is very good. But, Ktor's config option is enough.
a
Also, the configuration supports environment variables which could have different values based on the environment.
👍 1
d
That's right. I will use env that is provided from aws secret manager on the eks. So, the application.yaml will be like this.
Copy code
ktor:
  environment: "$KTOR_ENV:dev"
  application:
    modules:
      - com.mymy.ApplicationKt.module
  deployment:
    port: "$PORT:8080"
d
I use #hoplite for this @Dio...