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 (!notes || notes.length <= 0) return startListen();
|
||||
});
|
||||
} else {
|
||||
throw new Error('server still not ready after db synced');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue