Last active
May 10, 2018 11:52
-
-
Save oxbowlakes/f4850496b98b8eeb3374927fdffe7305 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error:(117, 26) type mismatch; | |
found : akka.http.scaladsl.server.Route | |
(which expands to) akka.http.scaladsl.server.RequestContext => scala.concurrent.Future[akka.http.scaladsl.server.RouteResult] | |
required: akka.stream.scaladsl.Flow[akka.http.scaladsl.model.HttpRequest,akka.http.scaladsl.model.HttpResponse,Any] | |
Http().bindAndHandle(route, thisHost, port) onComplete { | |
//where: | |
val route: Route = ??? | |
//and yet the documentation: http://doc.akka.io/docs/akka-http/current/scala/http/routing-dsl/index.html | |
val bindingFuture = Http().bindAndHandle(route, "localhost", 8080) | |
//So - does bindAndHandle accept a Route, a Flow, or what? How do I turn a Route into a Flow? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If anybody else has this problem, the solution to this is simple (even not explicitly explained):
Add an
implicit val
likewhich is in the dependency
After including the
implicit val
the system compiles for me.