HealthCheckPlug
Respond to health checks without needing a route or controller action.
Optionally, add the health check plug in your endpoint before Plug.Logger
in order to respond
to health checks without adding noise your logs.
Installation
Add plug_health
to your list of dependencies in mix.exs
:
def deps do
[
{:plug_health, "~> 0.1.0"}
]
end
Call the plug in your endpoint.ex
plug HealthCheckPlug, path: "/alive"