1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-11 09:32:51 +00:00
Files
classic-wow-forums/lib/myapp/repo.ex
2017-12-31 20:19:44 -06:00

12 lines
260 B
Elixir

defmodule MyApp.Repo do
use Ecto.Repo, otp_app: :myapp
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
end