--- edit: solved --- Hello :wave: How do I instant...
# ktor
d
--- edit: solved --- Hello 👋 How do I instantiate my configuration properties from a file in
BaseApplicationPlugin.install(...)
, i.e.
Copy code
data class MyConfiguration(val config: ApplicationConfig)
class MyPlugin(config: MyConfiguration) {
    companion object Plugin : BaseApplicationPlugin<Application, MyConfiguration, MyPlugin> {
        override val key: AttributeKey<GraphQLPlugin> = AttributeKey("MyPlugin")

        override fun install(pipeline: Application, configure: MyConfiguration.() -> Unit): MyPlugin {
            val plugin = MyPlugin(MyConfiguration(<need app config>).apply(configure)) // <==== where do I get app config to pass to configuration?????
            ....
            return plugin
        }
}
example only has simple use case using the function -> https://ktor.io/docs/custom-plugins.html#configuration-file
solved 1
looks like I can access it through
Application
->
pipeline.environment.config