diff --git a/example/src/main/scala/example/Endpoints.scala b/example/src/main/scala/example/Endpoints.scala index 1cf7f2f9b..96b9cf530 100644 --- a/example/src/main/scala/example/Endpoints.scala +++ b/example/src/main/scala/example/Endpoints.scala @@ -2,22 +2,16 @@ package example import zhttp.endpoint._ import zhttp.http.Method.GET -import zhttp.http.{HttpApp, Response} +import zhttp.http.Response import zhttp.service.Server import zio.{App, ExitCode, URIO} object Endpoints extends App { - def h1 = GET / "a" / *[Int] / "b" / *[Boolean] to { a => + def app = GET / "a" / *[Int] / "b" / *[Boolean] to { a => Response.text(a.params.toString) } - def h2 = GET / *[Int] / "b" / *[Boolean] to { a => - Response.text(a.params.toString) - } - - def app: HttpApp[Any, Throwable] = h1 ++ h2 - // Run it like any simple app override def run(args: List[String]): URIO[zio.ZEnv, ExitCode] = - Server.start(8090, app).exitCode + Server.start(8091, app).exitCode }