overleaf/services/web/modules/server-ce-scripts/scripts/check-mongodb.js

13 lines
277 B
JavaScript
Raw Normal View History

const { waitForDb } = require('../../../app/src/infrastructure/mongodb')
waitForDb()
.then(() => {
console.error('Mongodb is up.')
process.exit(0)
})
.catch(err => {
console.error('Cannot connect to mongodb.')
console.error(err)
process.exit(1)
})