Skip to content

andres99x/plug_health_check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlugHealthCheck

Build Status

Health Check endpoint plug.

Responds with status 200 OK and body OK to GET requests at an especific path.

Installation

Add plug_health_check to your dependency list in mix.exs:

def deps do
  [{:plug_health_check, "~> 0.0.1"}]
end

Docs

Docs can be found at https://hexdocs.pm/plug_health_check.

Usage

Plug it into your pipeline:

defmodule WebApp do
  use Plug.builder
  plug PlugHealthCheck

  # ... rest of the code
end

Customize the path with the :path option (default: /health/check):

defmodule WebApp do
  use Plug.builder
  plug PlugHealthCheck, plug: "/health"

  # ... resto of the code
end

Contibuting

Everyone is welcome to contribute and help it improve!

Development

w/Docker

Requirements:

  • docker
  • docker-compose

Build the container image with:

$ docker-compose build web

Open a shell to the container to start working with mix:

$ docker-compose run --rm web /bin/bash

Run test with:

$ docker-compose run web

About

Health Check endpoint plug

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published