Popularity
3.3
Growing
Activity
2.8
Declining
24
1
1

Monthly Downloads: 4,472
Programming language: Elixir
License: MIT License
Latest version: v1.0.0

plug_heartbeat alternatives and similar packages

Based on the "Framework Components" category

Do you think we are missing an alternative of plug_heartbeat or a related project?

Add another 'Framework Components' Package

README

PlugHeartbeat

A tiny plug for responding to heartbeat requests.

Installation and docs

Documentation is available on hex.pm.

Add a dependency to your application's mix.exs file:

defp deps do
  [{:plug_heartbeat, "~> 1.0"}]
end

then run mix deps.get.

Usage

Just plug this plug (sorry) in your plug pipeline:

defmodule MyServer do
  use Plug.Builder
  plug PlugHeartbeat
  # ... rest of the pipeline
end

With this setup, all GET and HEAD requests to /heartbeat will return a 200 OK status and OK as the body. This path can be customized through the :path option:

defmodule MyServer do
  use Plug.Builder
  plug PlugHeartbeat, path: "/health"
  # ... rest of the pipeline
end

That's pretty much it, but the docs contain further details.

License

MIT © Andrea Leopardi, see the [license file][license].


*Note that all licence references and agreements mentioned in the plug_heartbeat README section above are relevant to that project's source code only.