Packages

UP Uptime/Status Incidents and Maintenance Management.

Current section

Files

Jump to
up lib up_application.ex
Raw

lib/up_application.ex

defmodule UP.Application do
use Application
def port, do: Application.get_env(:up, :port, 5010)
def start(_, _) do
children = [ { Plug.Cowboy, scheme: :http, plug: UP.Endpoint, options: [port: port()] } ]
opts = [strategy: :one_for_one, name: App.Supervisor]
:io.format "UP (Uptime/Status) server listening at port: #{port()}.~n"
Supervisor.start_link(children, opts)
end
end