mobilizon.chapril.org-mobil.../lib/eventos/repo.ex
Thomas Citharel 1217361b6c fix some code style and add checks to ci
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-01-14 17:57:25 +01:00

15 lines
302 B
Elixir

defmodule Eventos.Repo do
@moduledoc """
Eventos Repo
"""
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