mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
closes #6844
This commit is contained in:
@@ -77,9 +77,9 @@ mongoModule.getConnectionString = function () {
|
||||
if (!nconf.get('mongo:port')) {
|
||||
nconf.set('mongo:port', 27017);
|
||||
}
|
||||
console.log(nconf.get('mongo:database'), typeof nconf.get('mongo:database'));
|
||||
if (!nconf.get('mongo:database')) {
|
||||
console.log('switching to nodebb database');
|
||||
const dbName = nconf.get('mongo:database');
|
||||
if (dbName === undefined || dbName === '') {
|
||||
winston.warn('You have no database name, using "nodebb"');
|
||||
nconf.set('mongo:database', 'nodebb');
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,9 @@ postgresModule.getConnectionOptions = function () {
|
||||
if (!nconf.get('postgres:port')) {
|
||||
nconf.set('postgres:port', 5432);
|
||||
}
|
||||
if (!nconf.get('postgres:database')) {
|
||||
const dbName = nconf.get('postgres:database');
|
||||
if (dbName === undefined || dbName === '') {
|
||||
winston.warn('You have no database name, using "nodebb"');
|
||||
nconf.set('postgres:database', 'nodebb');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user