| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1x 6x 1x | const LOCALHOST_DB_POSTGRESQL_URL = 'postgres://postgres@localhost:5432/node-friends-app';
/**
* Generates a valid DB connection info object.
* @return {Object} All info needed to connect Sequalize to DB
*/
function getConfig() {
return {
url: process.env.DB_POSTGRESQL_URL || LOCALHOST_DB_POSTGRESQL_URL,
};
}
module.exports = {
getConfig,
...getConfig(),
};
|