Skip to content

Commit

Permalink
Switch back to ember
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Aug 24, 2022
1 parent 92e300c commit 758244f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,18 @@ Global / fileServicePort := {
import cats.data.Kleisli
import cats.effect.IO
import cats.effect.unsafe.implicits.global
import com.comcast.ip4s._
import org.http4s._
import org.http4s.dsl.io._
import org.http4s.blaze.server.BlazeServerBuilder
import org.http4s.ember.server.EmberServerBuilder
import org.http4s.server.staticcontent._
import java.net.InetSocketAddress

(for {
deferredPort <- IO.deferred[Int]
_ <- BlazeServerBuilder[IO]
.bindSocketAddress(new InetSocketAddress("localhost", 0))
_ <- EmberServerBuilder
.default[IO]
.withPort(port"0")
.withHttpWebSocketApp { wsb =>
HttpRoutes
.of[IO] {
Expand All @@ -91,7 +93,7 @@ Global / fileServicePort := {
}
.orNotFound
}
.resource
.build
.map(_.address.getPort)
.evalTap(deferredPort.complete(_))
.useForever
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildInfoKeys += "http4sVersion" -> http4sVersion

libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.1"
libraryDependencies += "org.http4s" %% "http4s-dsl" % http4sVersion
libraryDependencies += "org.http4s" %% "http4s-blaze-server" % "0.23.12"
libraryDependencies += "org.http4s" %% "http4s-ember-server" % http4sVersion

addSbtPlugin("org.http4s" % "sbt-http4s-org" % "0.14.4")
addSbtPlugin("com.armanbilge" % "sbt-bundlemon" % "0.1.3")
Expand Down

0 comments on commit 758244f

Please sign in to comment.