Skip to content

Instantly share code, notes, and snippets.

@samcorcos
Last active October 28, 2016 19:59
Show Gist options
  • Save samcorcos/c53f3aca4c57d047816a09b36d75680a to your computer and use it in GitHub Desktop.
Save samcorcos/c53f3aca4c57d047816a09b36d75680a to your computer and use it in GitHub Desktop.
defmodule LearnPhoenix do
use Application
def start(_type, _args) do
...
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: LearnPhoenix.Supervisor]
start_result = Supervisor.start_link(children, opts)
# Run migrations on start
Ecto.Migrator.run(LearnPhoenix.Repo, "priv/repo/migrations", :up, all: true)
start_result
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment