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:
@@ -27,11 +27,12 @@ object QuillContext {
|
||||
|
||||
/** DataSource layer from HikariCP configuration
|
||||
*
|
||||
* Reads configuration from "database" prefix in application.conf.
|
||||
* Reads configuration from "hikari" prefix in application.conf.
|
||||
* Uses separate prefix from "database" to avoid conflict with ZIO config.
|
||||
* HikariCP manages the connection pool.
|
||||
*/
|
||||
val dataSourceLayer: ZLayer[Any, Throwable, DataSource] =
|
||||
Quill.DataSource.fromPrefix("database")
|
||||
Quill.DataSource.fromPrefix("hikari")
|
||||
|
||||
/** Quill PostgreSQL context with snake_case naming
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user