feat(01-01): create HTTP routes and Main entry point

- HealthRoutes with GET /health returning 'ok'
- Routes composition point for all route modules
- Main extends ZIOAppDefault with HOCON config
- ASCII sun banner with SUMMERCMS branding
- Server reads port from application.conf
This commit is contained in:
Jakub Zych
2026-02-04 21:43:24 +01:00
parent 4278b84614
commit 3757cf883b
3 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package api
import zio.http.*
/** Health check endpoints
*
* Provides basic health check endpoint for load balancers and monitoring systems. The /health
* endpoint returns 200 OK when the server is running.
*
* Future endpoints:
* - /ready will verify database connectivity
*/
object HealthRoutes {
val routes: Routes[Any, Response] =
Routes(
Method.GET / "health" -> Handler.text("ok")
)
}

View File

@@ -0,0 +1,14 @@
package api
import zio.http.*
/** Route composition point
*
* Aggregates all route modules in the application. Add new route modules here as they're created.
*/
object Routes {
val routes: Routes[Any, Response] =
HealthRoutes.routes
}