makeorbreak-io/api

DB_URL vs DATABASE_URL

Closed this issue · 3 comments

Hi,

I was checking which env vars are being used. README says I should configure DB_URL, but the code references both DB_URL and DATABASE_URL:

config/test.exs
7:  url: "#{System.get_env("DB_URL")}-test"

config/prod.secret.exs
8:  System.get_env("DATABASE_URL") ||
10:    environment variable DATABASE_URL is missing.

lib/api/repo.ex
8:  DB_URL environment variable.
11:    {:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}

Which one should I use? should this be normalized to use DATABASE_URL everywhere?

Good point, I would prefer to normalize it as DATABASE_URL.

I'll create a PR to normalize it, then.

Fix is merged