Created
November 10, 2014 20:54
-
-
Save bjhaid/4826ce0a280ae21f9992 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Repo do | |
use Ecto.Repo, adapter: Ecto.Adapters.Postgres, env: Mix.env | |
@doc "Adapter configuration" | |
def conf(env) do | |
a = parse_url url(env) | |
IO.inspect(a) | |
a | |
end | |
defp url(:dev) do | |
"ecto://postgres:postgres@localhost:5433/foo_dev" | |
end | |
defp url(:test) do | |
"ecto://postgres:postgres@localhost:5433/foo_test?size=1&max_overflow=0" | |
end | |
defp url(:prod) do | |
"ecto://postgres:postgres@localhost:5433/foo_prod" | |
end | |
@doc "The priv directory to load migrations and metadata." | |
def priv do | |
app_dir(:elixir_worker, "priv/foo") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment