PhoenixHealthy.Plug (phoenix_healthy v0.1.0)

Copy Markdown View Source

Plug that serves liveness and readiness probes.

In an endpoint (requests that do not match are passed through):

plug PhoenixHealthy.Plug, repo: MyApp.Repo

In a Phoenix router:

import PhoenixHealthy.Router
phoenix_healthy("/health", repo: MyApp.Repo)

Or forward it yourself:

forward "/health", PhoenixHealthy.Plug, repo: MyApp.Repo, forward: true