diff options
Diffstat (limited to 'src/main/scala')
| -rw-r--r-- | src/main/scala/main/Http/Http.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/scala/main/Http/Http.scala b/src/main/scala/main/Http/Http.scala new file mode 100644 index 0000000..a56a563 --- /dev/null +++ b/src/main/scala/main/Http/Http.scala @@ -0,0 +1,16 @@ +import zio._ +import zio.http._ + +// https://ziohttp.com/ + +object GreetingServer extends ZIOAppDefault { + val routes = + Routes( + Method.GET / "stability" -> handler { (req: Request) => + val name = req.queryOrElse("", "World") + Response.text("stable!") + } + ) + + def run = Server.serve(routes).provide(Server.default) +} |
