From 41a7f99152258df7dd1d72ba778413d0cc2b568b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kapica?= Date: Sat, 22 Jun 2024 23:54:44 +0200 Subject: [PATCH] Change Server to a while loop to detect issues --- api/src/main/scala/Server.scala | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/api/src/main/scala/Server.scala b/api/src/main/scala/Server.scala index 1cfb59d..95b10fb 100644 --- a/api/src/main/scala/Server.scala +++ b/api/src/main/scala/Server.scala @@ -9,19 +9,23 @@ import scala.concurrent.duration.Duration object Server { def run() = - implicit val system = ActorSystem(Behaviors.empty, "my-system") - implicit val executionContext = system.executionContext - val keepAlive = Promise[Unit].future - - val host = "0.0.0.0" - val port = 8080 - - val bindingFuture = Http() - .newServerAt(host, port) - .bind(Routes.route) - + while (true) { + println("Hello, world!") + Thread.sleep(1000) + } +// implicit val system = ActorSystem(Behaviors.empty, "my-system") +// implicit val executionContext = system.executionContext +// val keepAlive = Promise[Unit].future +// +// val host = "0.0.0.0" +// val port = 8080 +// +// val bindingFuture = Http() +// .newServerAt(host, port) +// .bind(Routes.route) +// // Database.test() - - Await.result(keepAlive, Duration.Inf) +// +// Await.result(keepAlive, Duration.Inf) }