-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[style] use async/await #325
Comments
I changed all promises into async functions in express at weihanglo/send@bbe111a. However, in storage.js, methods on Redis client seem cannot be promisified by NodeJS 8 |
@weihanglo thanks! Feel free to submit a PR and we can discuss the details there. |
Awesome work, @weihanglo! There are a few more Promise notes buried in #64 (most notably the #64 (comment) which has a pointer to the official Redis+Promise documentation on using bluebird to promisify the entire RedisClient using something like: bluebird.promisifyAll(redis.RedisClient.prototype); I only briefly played with their sample code, but I'm sure we could figure it out if you need a second pair of eyes. |
Use async function instead of promise (#325)
@pdehaan Can this issue be closed? I think it's fixed now... |
@gautamkrishnar I think we're still keeping this open until we try and promisify the server/storage.js bits. |
It might be fun to use
async/await
syntax on the server.Here's a sample snippet:
The text was updated successfully, but these errors were encountered: