⌚ OpenOpeningstijden main server application
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

environment.rb 368B

12345678910111213141516171819
  1. # frozen_string_literal: true
  2. ##
  3. # Setup of database.
  4. Hours.configure do |config|
  5. default_app_db_url = URI::Generic.new(
  6. 'postgres',
  7. "#{ENV['DB_USER']}:#{ENV['DB_PASSWORD']}",
  8. ENV['DB_HOST'],
  9. ENV['DB_PORT'],
  10. nil,
  11. "/#{ENV['DB_NAME']}",
  12. nil,
  13. nil,
  14. nil
  15. )
  16. config.database_url = ENV['DATABASE_URL'] || default_app_db_url.to_s
  17. end