Packages

Ezmodex is a lightweight experimental Elixir microframework built on top of Plug

Current section

Files

Jump to
ezmodex lib ezmodex.ex
Raw

lib/ezmodex.ex

defmodule Ezmodex do
use Application
def start(_type, _args) do
import Supervisor.Spec
children = [
Plug.Adapters.Cowboy.child_spec(
:http,
Application.get_env(:ezmodex, :router),
[],
[port: Application.get_env(:ezmodex, :port)]
)
]
opts = [strategy: :one_for_one]
Supervisor.start_link(children, opts)
end
end