Skip to content

Use an app root object for all function registrations #3

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

Closed
ejizba opened this issue Jun 13, 2022 · 1 comment
Closed

Use an app root object for all function registrations #3

ejizba opened this issue Jun 13, 2022 · 1 comment

Comments

@ejizba
Copy link
Owner

ejizba commented Jun 13, 2022

Collecting feedback from various places on the app root object. Seems like everyone is overwhelmingly in favor of it, but we can have further discussion here.

From @aaronpowell:

  • I like this approach as it mirrors the kind of thing we find with Express, Fastify, and other web frameworks
  • It also makes for a clear ordering to the Functions that are defined, so if you've got multiple HTTP triggers that work off similar routes, you should have a clear order of precedence
  • It would also make it easier to have discovery, rather than having to know what you can import, you import one thing and intellisense will tell you want it can do

From @YunchuWang

With a central object like app for managing functions, it is more intuitive for users to know/look up methods compared to option1 via intellijsense. (ex, typing app. autocompletes list of methods)

@ejizba
Copy link
Owner Author

ejizba commented Sep 2, 2022

Closing in favor of Azure/azure-functions-nodejs-library#12

@ejizba ejizba closed this as completed Sep 2, 2022
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