Helio
10/29/2024, 5:06 AMval builder = ApplicationEnvironmentBuilder()
builder.developmentMode = false
builder.connector {
port = 8082
}
builder.module {}
Do you have any example how the above should be handled on Ktor 3.x? I checked the migration guide, but it only says about renaming classes.Aleksei Tirman [JB]
10/29/2024, 10:57 AMval server = embeddedServer(Netty, serverConfig(applicationEnvironment()) {
developmentMode = true
module {
}
}, configure = {
connectors.add(EngineConnectorBuilder().apply {
port = 8082
})
})
Helio
10/29/2024, 11:11 AMserverConfig
under configure
.
embeddedServer(Netty,
configure = {
connector { port = 8080 }
serverConfig { developmentMode = false }
},
module = {
mainModule()
}
).start(wait = false)
Helio
10/29/2024, 12:20 PMAleksei Tirman [JB]
10/29/2024, 12:52 PMserverConfig { developmentMode = false }
call creates an instance of the ServerConfig
but this configuration isn't applied (has no effect) to the server.Helio
10/29/2024, 9:05 PMconfigure = {
configure = { connector { port = 8082 } },
connector { port = 8082 }
applicationEnvironment {
serverConfig { developmentMode = false }
}
},
Anyway, I'll probably go with your approach if I ended-up needing to set developmentMode again. It seems that the tests that used to fail because that was not set are now passing. 🤷🏽