-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to execute async functions in Node 8+ #94
Comments
@ColbyTresness as well - not sure who is managing the Node tasks 😃 |
@jeffhollan - thanks!! a small note, i think it would be better to leave out mention of node version in the verbage. we added node 10 support (not yet released though) and |
Related to Azure/Azure-Functions#431 |
@jeffhollan @ColbyTresness should we turn this into a task to update the v2 templates to use async? If so we could move this issue to the templates repo. Would be nice as it would naturally demonstrate to users that they can use async and help cases where users forget to call context.done(). |
Yes I have started using by default and haven't seen any bad side-effects. I think it makes sense to move to the templates repo as a v2 must have |
@jeffhollan opened a PR in the docs repo too to update about context.done with async functions. |
@jeffhollan @ColbyTresness @mhoeger can we close this? |
I'm cool with it and know @ColbyTresness has been working with @mhoeger on docs so likely this is covered. I'll let them |
Lets leave it for a bit longer (1 week max) since this is something we've touched but haven't done a final pass through yet. I'll close this when that happens. |
@ColbyTresness - how is this? or does async deserve its own bucket? |
@mhoeger Sorry about the delay. I think what we have is a good start, but it doesn't seem sufficient: the only place we mention async in our JavaScript developer guide is in the context.done() section, which doesn't 100% make sense since using async means they don't need context.done(), and hence wouldn't look there. Upon further examination, I think this is important enough information to add as a paragraph in the intro section of the JS Dev guide. Thoughts? |
Just for anyone that finds this issue and is looking for the updated docs, they are here: |
You can execute async functions in Node 8 today, but means you need to:
async ()
keyword before the method parameterscontext.done()
method (I assume) as it throws an error and appears to work fine without it.@asavaritayal to help assign this. I'm happy to help or own this but wanted to make sure we were tracking somewhere. Feel free to move to right spot
The text was updated successfully, but these errors were encountered: