https://kotlinlang.org logo
#ktor
Title
# ktor
j

janvladimirmostert

07/08/2020, 7:17 PM
i noticed in the docs that having watchPaths turned on for production leads to a performance penalty, i'm assuming giving it an empty list will mitigate this performance penalty?
Copy code
embeddedServer(
			CIO,
			module = Application::module,
			port = if (ENV.env == LOCAL) {
				7777
			} else {
				80
			},
			watchPaths = if (ENV.env == LOCAL) {
				listOf("build")
			} else {
				listOf()
			}
		).apply {
			start(wait = true)
		}
w

Wilfred

07/08/2020, 8:59 PM
Yes. The watch is only active for one or more paths. This should show in the console if it’s not active;
2020-07-08 20:57:58.450 [main] INFO  Application - No ktor.deployment.watch patterns specified, automatic reload is not active
🍺 1