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

Add entrypoint for app-level code #537

Closed
ejizba opened this issue Feb 17, 2022 · 3 comments · Fixed by #576
Closed

Add entrypoint for app-level code #537

ejizba opened this issue Feb 17, 2022 · 3 comments · Fixed by #576
Assignees
Labels
enhancement P2 v4 model 🚀 Related to the new V4 programming model
Milestone

Comments

@ejizba
Copy link
Contributor

ejizba commented Feb 17, 2022

UPDATE: Per the final design, you can specify a single file or a glob pattern for multiple files as the "main" field in your "package.json" file.


Basically, provide a way for users to run app-level code when the worker is initialized. This would be directly beneficial for the new hooks feature (#522), but could realistically be used for any arbitrary code. Current proposal is to respect the main field in a user's package.json

NOTE: I already added the function app dir to the worker init request in Azure/azure-functions-host#8144, necessary to read the user's package.json

@aaronpowell
Copy link

With the change on the Function Host, will there be some more data provided to the workers when they start up, info that can be used to find the package.json?

@ejizba
Copy link
Contributor Author

ejizba commented Feb 17, 2022

Yes that is the point of the change on the host and it will also help with #531, if that's what you're after 😝

@aaronpowell
Copy link

Yes that is the point of the change on the host and it will also help with #531, if that's what you're after 😝

MaaaaybeGIF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement P2 v4 model 🚀 Related to the new V4 programming model
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants