From 9003a6d59f37e4574920d22a1cd9b88750237cb8 Mon Sep 17 00:00:00 2001 From: limepotato Date: Sun, 15 Sep 2024 21:53:03 -0600 Subject: [PATCH] application configuration file --- backend/application.yaml | 7 +++++++ .../nelle/nelleObserverBackend/Application.kt | 11 +++-------- 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 backend/application.yaml diff --git a/backend/application.yaml b/backend/application.yaml new file mode 100644 index 0000000..fd03cba --- /dev/null +++ b/backend/application.yaml @@ -0,0 +1,7 @@ +ktor: + development: true + deployment: + port: 7879 + application: + modules: + - observer.nelle.nelleObserverBackend.ApplicationKt.module \ No newline at end of file diff --git a/backend/src/main/kotlin/observer/nelle/nelleObserverBackend/Application.kt b/backend/src/main/kotlin/observer/nelle/nelleObserverBackend/Application.kt index 395a4f1..0536913 100644 --- a/backend/src/main/kotlin/observer/nelle/nelleObserverBackend/Application.kt +++ b/backend/src/main/kotlin/observer/nelle/nelleObserverBackend/Application.kt @@ -15,14 +15,9 @@ import io.ktor.server.plugins.cors.routing.* import kotlinx.coroutines.runBlocking import observer.nelle.nelleObserverBackend.plugins.configureRouting -fun main(args: Array) { - embeddedServer( - Netty, - port = 7879, // This is the port on which Ktor is listening - host = "0.0.0.0", - module = Application::module, - ).start(wait = true) -} +fun main(args: Array): Unit = + io.ktor.server.netty.EngineMain + .main(args) fun Application.module() { install(ContentNegotiation)