Packages

Generate a simple free-standing application with an ecto layer, intended to be used as a database resource in an application written using decoupled resources.

Current section

Files

Jump to
gen_template_ecto_server template $PROJECT_NAME$ lib user application.ex
Raw

template/$PROJECT_NAME$/lib/user/application.ex

defmodule User.Application do
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
supervisor(User.Repo, []),
]
opts = [strategy: :one_for_one, name: User.Supervisor]
Supervisor.start_link(children, opts)
end
end