|
|
@@ -2,7 +2,7 @@ const repl = require('repl');
|
|
|
const fs = require('fs');
|
|
|
const path = require('path');
|
|
|
const mongoose = require('mongoose');
|
|
|
-const { getMongoUri, mongoOptions } = require('~/server/util/mongoose-utils');
|
|
|
+const { initMongooseGlobalSettings, getMongoUri, mongoOptions } = require('~/server/util/mongoose-utils');
|
|
|
|
|
|
const models = require('./models');
|
|
|
|
|
|
@@ -32,6 +32,8 @@ fs.readFile(replHistoryPath, 'utf8', (err, data) => {
|
|
|
replServer.context.mongoose = mongoose;
|
|
|
replServer.context.models = models;
|
|
|
|
|
|
+initMongooseGlobalSettings();
|
|
|
+
|
|
|
mongoose.connect(getMongoUri(), mongoOptions)
|
|
|
.then(() => {
|
|
|
replServer.context.db = mongoose.connection.db;
|