diff options
| author | Wu Cheng-Han | 2016-11-07 21:31:11 +0800 |
|---|---|---|
| committer | Wu Cheng-Han | 2016-11-07 21:31:11 +0800 |
| commit | b9c4af8a65e9f328a39146caf6189e3b8e13633e (patch) | |
| tree | 5a43530286175917c3a8243df8913c0731199812 | |
| parent | b5920fbbd1ceb595456da18f7d458b63d1a960bf (diff) | |
Add to throw error when server not ready after db synced
| -rw-r--r-- | app.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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'); } }); |
