2017-12-08 09:58:14 +01:00
|
|
|
defmodule Eventos.Repo do
|
2018-01-14 17:56:50 +01:00
|
|
|
@moduledoc """
|
|
|
|
Eventos Repo
|
|
|
|
"""
|
2017-12-08 09:58:14 +01:00
|
|
|
use Ecto.Repo, otp_app: :eventos
|
|
|
|
|
|
|
|
@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
|