[www] exit if mongo connection fails
This commit is contained in:
1 parent
07e0d85f3e
commit
7233347579
1 file changed
+6
@@ -6,7 +6,13 @@ import server from './server'
|
|||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
async function loop() {
|
async function loop() {
|
||||||
|
try {
|
||||||
await connect(dbUri)
|
await connect(dbUri)
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e.message)
|
||||||
|
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
const Config = require('./core/Config')
|
const Config = require('./core/Config')
|
||||||
const config = await Config.findConfig()
|
const config = await Config.findConfig()
|
||||||
|
|||||||
Reference in new issue
Block a user