Advertisement
Guest User

Untitled

a guest
Mar 14th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. # config/config.exs
  2.  
  3. # ...
  4.  
  5. use Mix.Config
  6.  
  7. import_config_exist = fn filename ->
  8. path = Path.join("config", filename)
  9.  
  10. if File.exists?(path) do
  11. import_config filename
  12. end
  13. end
  14.  
  15. import_config_exist.("env.local.exs")
  16.  
  17. config :app, App.Repo,
  18. username: System.get_env("DB_USERNAME"),
  19. password: System.get_env("DB_PASSWORD"),
  20. database: System.get_env("DB_NAME"),
  21. hostname: System.get_env("DB_HOSTNAME"),
  22. pool_size: 10
  23.  
  24. # ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement