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

Why we need to set the serverUrl? #1221

Closed
zhouhao27 opened this issue Mar 28, 2016 · 5 comments
Closed

Why we need to set the serverUrl? #1221

zhouhao27 opened this issue Mar 28, 2016 · 5 comments

Comments

@zhouhao27
Copy link

I'm wondering why we need to set the serverUrl in parse-server application? Why can't we just use relative path for this, for example, "/parse" instead?

The reason I ask this question is I'd like to deploy the parse server to a load balance server. There is no way for me to implement load balance if different app using different serverUrl. Any idea? Thanks.

@flovilmart
Copy link
Contributor

serverURL should be a loopback URL so the server is able to use the Parse SDK on itself.

@zhouhao27
Copy link
Author

Thanks. Does this mean I can always set serverUrl to something like http://localhost:1337?

@drew-gross
Copy link
Contributor

Yep! As long as you are running your server on port 1337, that should work.

@zhouhao27
Copy link
Author

This is a bit misleading because server should know it's own url. And there is a method in client with the same name serverUrl.

Thanks anyway.

@drew-gross
Copy link
Contributor

Yeah. Ideally we would like to make some changes to the JS SDK that make it not need a server URL, but that isn't particularly easy. Maybe it will come later.

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

3 participants