Skip to content
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

Node Templates - return with $return or return object #771

Open
mhoeger opened this issue Oct 11, 2018 · 0 comments
Open

Node Templates - return with $return or return object #771

mhoeger opened this issue Oct 11, 2018 · 0 comments
Assignees
Milestone

Comments

@mhoeger
Copy link
Contributor

mhoeger commented Oct 11, 2018

context.bindings.namedOutput is currently the default, but it is likely a better async JS functions pattern to use return values, either by directly returning and using $return, or by returning the object. Here is some more context: Azure/Azure-Functions#431

From issue:

As a newbie, knowing to change host.json to use $return instead of res falls into category of somewhat arcane rule (albeit easy enough to understand once pointed to that direction) - prior to change, seemingly basic stuff wouldn't function as expected (promises or otherwise), even after consulting copious amount of literature on js/async/promises/etc. ... today I'd throw a +1 vote for having the defaults sticking to what I perceive to be the relatively better known concept of $return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant