Skip to content

Commit

Permalink
use 127.0.0.1 instead localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
jupe committed Apr 2, 2024
1 parent 56c2b7d commit 217887e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/config.defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"port": 8000,
"webtoken": "OpenTMI-toP-SeCRet-tOKEn",
"webtokenExpirationDays": 5,
"db": "mongodb://localhost/opentmi",
"db": "mongodb://127.0.0.1/opentmi",
"filedb": "./data",
"auto-reload": false,
"autoInstallAddonDeps": false,
Expand Down
4 changes: 2 additions & 2 deletions app/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config = require('./tools/config');
let dbUrl = config.get('db');
const dbOptions = config.get('mongo') || {};
mongoose.Promise = Promise;
mongoose.set('strictQuery', true);

let mongoServer = null;
let tearingDown = false;
Expand All @@ -24,13 +25,12 @@ const initialize = async function () {

const connect = async function () {
const must = {
logger: logger.info.bind(logger),
useNewUrlParser: true,
useUnifiedTopology: true
};
const overwritable = {
appname: 'opentmi',
loggerLevel: 'info'
loggerLevel: 'info',
};
const options = _.merge(overwritable, dbOptions, must);

Expand Down
2 changes: 1 addition & 1 deletion test/config.auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"port": 3000,
"webtoken": "OpenTMI-toP-SeCRet-tOKEn",
"webtokenExpirationDays": 5,
"db": "mongodb://localhost/opentmi_test",
"db": "mongodb://127.0.0.1/opentmi_test",
"filedb": "./data",
"auto-reload": false,
"silent": false,
Expand Down

0 comments on commit 217887e

Please sign in to comment.