diff options
| author | Abdellah El Morabit <nsrddyn@gmail.com> | 2025-11-28 14:02:22 +0100 |
|---|---|---|
| committer | Abdellah El Morabit <nsrddyn@gmail.com> | 2025-11-28 14:02:22 +0100 |
| commit | a018fbf5f3051f77d7bf75201213fb94651e8294 (patch) | |
| tree | 2488028ccec6646aa576d590f337ee6e6a5cd512 /src/main | |
| parent | eb6a89a1f4f9f5c10c3da312d58c72edd643fd4e (diff) | |
feature: basic http implementation
source https://ziohttp.com/
Diffstat (limited to 'src/main')
| -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) +} |
