From c0f41e45bb3ec0250ec6a5d93d743e6a97daa770 Mon Sep 17 00:00:00 2001 From: "Marco F." Date: Tue, 15 Oct 2024 11:45:51 +0200 Subject: [PATCH] Bye bye Finatra. Refers to #436 --- build.sbt | 8 -------- finatra/src/main/scala/AController.scala | 25 ------------------------ finatra/src/main/scala/WebServer.scala | 13 ------------ 3 files changed, 46 deletions(-) delete mode 100644 finatra/src/main/scala/AController.scala delete mode 100644 finatra/src/main/scala/WebServer.scala diff --git a/build.sbt b/build.sbt index 74bda5f..a2eb841 100644 --- a/build.sbt +++ b/build.sbt @@ -28,13 +28,6 @@ lazy val cask = (project in file("cask")).settings( ) ) -lazy val finatra = (project in file("finatra")).settings( - scalaVersion := scalaV, - libraryDependencies ++= Seq( - "com.twitter" %% "finatra-http-server" % "22.7.0" - ) -) - lazy val http4s = (project in file("http4s")).settings( scalaVersion := scalaV, scalafmtOnCompile := true, @@ -95,7 +88,6 @@ lazy val root = (project `zio-http`, `akka-http`, unfiltered, - finatra, http4s, play, scalatra, diff --git a/finatra/src/main/scala/AController.scala b/finatra/src/main/scala/AController.scala deleted file mode 100644 index e29ba26..0000000 --- a/finatra/src/main/scala/AController.scala +++ /dev/null @@ -1,25 +0,0 @@ -import com.twitter.finatra.http.Controller -import com.twitter.finagle.http.Request -import com.twitter.finatra.http.annotations.QueryParam - -case class Message(message: String) - -case class Whom(@QueryParam whom: String) - -class AController extends Controller { - get("/") { _: Request => - response.created(List(1, 2, 3)) - } - - get("/json") { _: Request => - response.created(Message("Hello, World!")) - } - - get("/plaintext") { _: Request => - response.created("Hello, World!") - } - - get("/say-hi") { hello: Whom => - response.created(s"Hello, ${hello.whom}") - } -} diff --git a/finatra/src/main/scala/WebServer.scala b/finatra/src/main/scala/WebServer.scala deleted file mode 100644 index 6bbf39f..0000000 --- a/finatra/src/main/scala/WebServer.scala +++ /dev/null @@ -1,13 +0,0 @@ -import com.twitter.finatra.http.HttpServer -import com.twitter.finatra.http.routing.HttpRouter - -object HelloWorldServerMain extends WebServer - -class WebServer extends HttpServer { - - override val defaultHttpPort: String = ":9000" - - override def configureHttp(router: HttpRouter) = { - val _ = router.add(new AController) - } -}