-
Notifications
You must be signed in to change notification settings - Fork 63
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
Serving multiple functions locally from a single server instance #109
Comments
Was expecting to be able to do this. I wish the Handlers construction and Path registration were separate like a simple http.Serve application. |
cc @grant |
Thanks for the report. @anniefu are you able to look at this and understand why this is happening? It seems like the fix is a breaking change. Maybe the setup is unexpected. Either way, we should test registering and serving multiple functions. |
just started looking into swtiching from my "custom" way of doing this to the gcf framework and I was also surprised this isn't working 🤔 |
When #95 was merged, the ability to serve several functions from one instance locally broke. I'm not sure whether it was ever intended to be possible, but since it was, we've been relying on it.
Let me elaborate just a bit. We have a single project from which we deploy 4 separate functions to Cloud Run. For convenience, in our local dev environments, we serve them all from a single server and port by registering each function with a separate call to
funcframework.RegisterHTTPFunctionContext
(previouslyfuncframework.RegisterHTTPFunction
).This was possible in 1.2.0 (yep, I've missed a few versions 😊), but broke when I upgraded to the most recent version.
It's still possible by passing an
http.ServeMux
tofuncframework.RegisterHTTPFunctionContext
orfunctions.HTTP
, but that seems more of a "chaotic lawful" solution than an actual solution.The text was updated successfully, but these errors were encountered: