feat(01-02): add /ready endpoint with database connectivity check

- Add GET /ready endpoint that checks database connection
- Returns 200 'ready' when connected, 503 when not
- Update Routes to require DataSource dependency
- Provide dataSourceLayer in Main.scala
- Use 'hikari' prefix for HikariCP config to avoid ZIO config conflict
This commit is contained in:
Jakub Zych
2026-02-04 22:20:35 +01:00
parent ddb1964d1a
commit 0059add4a1
5 changed files with 33 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
package api
import zio.http.*
import javax.sql.DataSource
/** Route composition point
*
@@ -8,7 +9,7 @@ import zio.http.*
*/
object Routes {
val routes: Routes[Any, Response] =
val routes: Routes[DataSource, Response] =
HealthRoutes.routes
}