Packages

Controllable dummy HTTP server for integration testing; HTTP control API compatible with MockServer (mock-server.com), plus Elixir stubs and routes (ejabberd/XMPP-friendly)

Current section

Files

Jump to
http_double lib http_double application.ex
Raw

lib/http_double/application.ex

defmodule HttpDouble.Application do
@moduledoc """
OTP application entry point for `:http_double`.
The application itself is intentionally minimal – it only starts a `Registry`
used for optional server naming. Individual HTTP dummy servers are started
via `HttpDouble.start_link/1` or as children under your own supervision tree
using `HttpDouble.child_spec/1`.
"""
use Application
@impl Application
def start(_type, _args) do
children = [
{Task.Supervisor, name: HttpDouble.TaskSupervisor},
{Registry, keys: :unique, name: HttpDouble.ServerRegistry}
]
Supervisor.start_link(children, strategy: :one_for_one, name: HttpDouble.Supervisor)
end
end