-
Notifications
You must be signed in to change notification settings - Fork 57
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
Call a function running locally #97
Comments
Hi Jose, That's a good idea, I hadn't thought about this! 🙂 I can see two options to do that:
Thoughts? |
I like that first one. People might run on different local hosts so they
should have to enter the entire URL if running locally. BTW great library,
intuitive and fun to use -- appreciate all the work put into it.
…On Fri, Feb 2, 2018 at 5:04 PM, Nathan Gaberel ***@***.***> wrote:
Hi Jose,
That's a good idea, I hadn't thought about this! 🙂
I can see two options to do that:
- allow the first argument of functions.call to be either a function
name (current behaviour) or a full URL. In the latter case we wouldn't
automatically generate a xxx.cloudfunctions.net URL and just use what
was passed by the user.
// Calls 'http://localhost:5000/greet?name=Jose':yield rsf.functions.call(
'http://localhost:5000/greet',
{ name: 'Jose' }
)
- create a new baseUrl property in rsf that is used to generate the
url, ie:
rsf.baseUrl = 'http://localhost:5000/'
[...]
// Calls 'http://localhost:5000/greet?name=Jose':yield rsf.functions.call(
'greet',
{ name: 'Jose' }
)
If not specified, we'd default to a xxx.cloudfunctions.net url.
Thoughts?
I'm inclined to go with the first option because it's more flexible,
although it does require the user to provide (and build) the full URL for
each call.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#97 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK4vLMa7pveh5eDeELkOsDpZeromsw8Iks5tQ5R7gaJpZM4R03cm>
.
|
@joserocha3 Thanks for the encouragement! This is now available in v0.11, let me know how that works for you. :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to call a function running locally?
Instead of
https://us-central1-project-id.firebaseapp.com/
it would run at sayhttp://localhost:5000/
.The text was updated successfully, but these errors were encountered: