before do
env['rack.errors'] = log
# TODO: Put the connection credentials to the right place
Object.const_set(:DB, PG::Connection.new(
dbname: 'd50b',
user: 'd50b',
password: 'postgres',
host: 'localhost',
port: '5432'
)
)
@db = getdb('songcontest')
@peepsdb = getdb('peeps')
end
We need to put them into the right place such that nothing is hardcoded, especially the password.
Currently, they are located here:
We need to put them into the right place such that nothing is hardcoded, especially the password.