Current section

Files

Jump to
ami lib ami repo.ex
Raw

lib/ami/repo.ex

defmodule Ami.Repo do
use Ecto.Repo, otp_app: :ami, adapter: Ecto.Adapters.Postgres
use Scrivener, page_size: 10
@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