summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2016-11-07 21:31:11 +0800
committerWu Cheng-Han2016-11-07 21:31:11 +0800
commitb9c4af8a65e9f328a39146caf6189e3b8e13633e (patch)
tree5a43530286175917c3a8243df8913c0731199812
parentb5920fbbd1ceb595456da18f7d458b63d1a960bf (diff)
Add to throw error when server not ready after db synced
-rw-r--r--app.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app.js b/app.js
index 0c66cc27..adb7f81f 100644
--- a/app.js
+++ b/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');
}
});