Created
May 18, 2020 08:11
-
-
Save adamw/28d17aac66462cbb1a7ed34ad85c7526 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
// the endpoints are interpreted as an http4s.HttpRoutes[IO] | |
import sttp.tapir.server.http4s._ | |
import org.http4s.HttpRoutes | |
implicit val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global | |
implicit val contextShift: ContextShift[IO] = IO.contextShift(ec) | |
implicit val timer: Timer[IO] = IO.timer(ec) | |
val routes: HttpRoutes[IO] = List(getPetWithLogic, addPetWithLogic).toRoutes | |
// expose routes using http4s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment