Skip to content

Instantly share code, notes, and snippets.

@adamw
Created November 24, 2018 20:36
Show Gist options
  • Save adamw/cf95490fa36299f50293d293d773a53d to your computer and use it in GitHub Desktop.
Save adamw/cf95490fa36299f50293d293d773a53d to your computer and use it in GitHub Desktop.
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