Skip to content

Commit

Permalink
Adjust example
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Aug 7, 2020
1 parent 69e7652 commit aac80fd
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ object ZioPartialServerLogicHttp4s extends App {

//

override def run(args: List[String]): ZIO[ZEnv, Nothing, ExitCode] =
override def run(args: List[String]): URIO[ZEnv, ExitCode] =
ZIO.runtime.flatMap { implicit runtime: Runtime[Any] =>
// starting the server
BlazeServerBuilder[Task](runtime.platform.executor.asEC)
Expand All @@ -93,12 +93,6 @@ object ZioPartialServerLogicHttp4s extends App {
.use { _ =>
test
}
.map(_ => ExitCode.success)
.catchAll { t =>
UIO {
println("Exception when starting server")
t.printStackTrace()
}.map(_ => ExitCode.failure)
}
.exitCode
}
}

0 comments on commit aac80fd

Please sign in to comment.