This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
graphql-lightning-talk/lib/faces/repo.ex
2018-04-08 09:20:53 +12:00

11 lines
260 B
Elixir

defmodule Faces.Repo do
use Ecto.Repo, otp_app: :faces
@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