mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
Add to throw error when server not ready after db synced
This commit is contained in:
parent
b5920fbbd1
commit
b9c4af8a65
1 changed files with 2 additions and 0 deletions
2
app.js
2
app.js
|
@ -487,6 +487,8 @@ models.sequelize.sync().then(function () {
|
||||||
if (err) throw new Error(err);
|
if (err) throw new Error(err);
|
||||||
if (!notes || notes.length <= 0) return startListen();
|
if (!notes || notes.length <= 0) return startListen();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
throw new Error('server still not ready after db synced');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue