[misc] migrate the app to the native mongo driver

acceptance tests to follow in a separate commit.
This commit is contained in:
Jakob Ackermann
2020-09-10 17:39:12 +01:00
parent 3a4aa45e2e
commit c630cbb4e3
15 changed files with 135 additions and 86 deletions
@@ -13,6 +13,7 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const app = require('../../../../app')
const { waitForDb } = require('../../../../app/js/mongodb')
require('logger-sharelatex')
const logger = require('logger-sharelatex')
const Settings = require('settings-sharelatex')
@@ -29,9 +30,10 @@ module.exports = {
return callback()
} else if (this.initing) {
return this.callbacks.push(callback)
} else {
this.initing = true
this.callbacks.push(callback)
}
this.initing = true
this.callbacks.push(callback)
waitForDb().then(() => {
return app.listen(
__guard__(
Settings.internal != null
@@ -56,7 +58,7 @@ module.exports = {
})()
}
)
}
})
}
}
function __guard__(value, transform) {