Skip to content

Commit

Permalink
Try out blaze for kicks
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Jan 30, 2022
1 parent 7835b05 commit 3805414
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Global / fileServicePort := {

(for {
deferredPort <- IO.deferred[Int]
_ <- EmberServerBuilder
.default[IO]
.withPort(Port.fromInt(0).get)
_ <- org.http4s.blaze.server.BlazeServerBuilder[IO]

// .withPort(Port.fromInt(0).get)
.withHttpWebSocketApp { wsb =>
HttpRoutes
.of[IO] {
Expand All @@ -81,7 +81,7 @@ Global / fileServicePort := {
}
.orNotFound
}
.build
.resource
.map(_.address.getPort)
.evalTap(deferredPort.complete(_))
.useForever
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ buildInfoKeys += "http4sVersion" -> http4sVersion
libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.1"
libraryDependencies += "org.http4s" %% "http4s-dsl" % http4sVersion
libraryDependencies += "org.http4s" %% "http4s-ember-server" % http4sVersion
libraryDependencies += "org.http4s" %% "http4s-blaze-server" % http4sVersion

addSbtPlugin("org.http4s" % "sbt-http4s-org" % "0.11.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.8.0")
Expand Down

0 comments on commit 3805414

Please sign in to comment.