mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
@@ -1,6 +1,5 @@
|
||||
import nconf from 'nconf';
|
||||
import logger from './logger';
|
||||
import autoinc from 'mongoose-id-autoinc';
|
||||
import mongoose from 'mongoose';
|
||||
import Bluebird from 'bluebird';
|
||||
|
||||
@@ -19,10 +18,8 @@ if (MAINTENANCE_MODE !== 'true') {
|
||||
|
||||
const NODE_DB_URI = nconf.get('IS_TEST') ? nconf.get('TEST_DB_URI') : nconf.get('NODE_DB_URI');
|
||||
|
||||
let db = mongoose.connect(NODE_DB_URI, mongooseOptions, (err) => {
|
||||
mongoose.connect(NODE_DB_URI, mongooseOptions, (err) => {
|
||||
if (err) throw err;
|
||||
logger.info('Connected with Mongoose.');
|
||||
});
|
||||
|
||||
autoinc.init(db);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user