Yes, you would not usually hardcode those values except for in the dev and test environments and that example does show how to get them from Environment Vars. You can also use Dotenvy to use a local .env file, which you can add to .gitignore so it does not get committed. I don’t think you need chatgpt for this one though ![]()
If you make a new app with “mix phx.new,” take a look at runtime.exs. You will see the database URL gets set up with “System.get_env(“DATABASE_URL”)” n the :prod environment, and you’d have to set that environment value for the app to run.






















