Async/await let's go!

This commit is contained in:
Zaid Abdulla committed 2019-06-05 00:17:36 -07:00
1 parent 1e6d3acd1b
commit c3501debd5
20 files changed
+2617 -2916

No files matched your search

+7 -5
View File
@@ -105,11 +105,13 @@ if (!cluster.worker) {
listener(req, res);
};
db2.connect(err => {
if (err) throw err;
cache.connect(err => {
if (err) throw err;
Promise.all([db2.connect(), cache.connect()])
.then(() => {
server.start(SERVICE_PORT, SERVICE_ADDRESS, ssl, _listener);
})
.catch(err => {
setTimeout(() => {
throw err;
});
});
});
}