Created
November 24, 2018 20:36
-
-
Save adamw/cf95490fa36299f50293d293d773a53d 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
object Server1 extends App with StrictLogging { | |
val dsl = Http4sDsl[Task] | |
import dsl._ | |
val service = HttpRoutes.of[Task] { | |
case GET -> Root / "test1" => Ok() | |
} | |
BlazeServerBuilder[Task] | |
.bindHttp(8081) | |
.withHttpApp(CorrelationId.setCorrelationIdMiddleware(service).orNotFound) | |
.serve | |
.compile | |
.drain | |
.runSyncUnsafe() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment