mirror of
https://github.com/ClaperCo/Claper.git
synced 2025-12-16 20:07:59 +01:00
14 lines
268 B
Elixir
14 lines
268 B
Elixir
defmodule Claper.Repo do
|
|
use Ecto.Repo,
|
|
otp_app: :claper,
|
|
adapter: Ecto.Adapters.Postgres
|
|
|
|
def init(_type, config) do
|
|
if url = System.get_env("DATABASE_URL") do
|
|
{:ok, Keyword.put(config, :url, url)}
|
|
else
|
|
{:ok, config}
|
|
end
|
|
end
|
|
end
|