You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q, promises worked really well for the basic crud operations, except for query. The .end() function somehow gets in the way. And I had some issues when trying to nest promises, because the Model's need to be reconverted back to objets.
+1 to @pptp. Async functions (aka async/await) is done and will come with the next ECMAScript release. So, I think we can benefit a lot if we use promises and async/await.
Hi!
You are using a passing of callback for supporting asynchrony
For example:
It means this callback will be called after saving.
I guess it will be more easier to use Promises for these purposes.
For example. We should type the following code:
So, using Promises we will be able to code as follows:
As far as I know, Node supports Promises since the version 0.12. For earlier versions there are shims.
Are you going to use Promises in the Nodal in near future?
Thanks,
Mike
The text was updated successfully, but these errors were encountered: