From a018fbf5f3051f77d7bf75201213fb94651e8294 Mon Sep 17 00:00:00 2001 From: Abdellah El Morabit Date: Fri, 28 Nov 2025 14:02:22 +0100 Subject: feature: basic http implementation source https://ziohttp.com/ --- src/main/scala/main/Http/Http.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/main/scala/main/Http/Http.scala (limited to 'src') 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) +} -- cgit v1.2.3-70-g09d2