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

Unable to connect to Parse API #199

Closed
david-koch-pro opened this issue May 24, 2016 · 12 comments
Closed

Unable to connect to Parse API #199

david-koch-pro opened this issue May 24, 2016 · 12 comments

Comments

@david-koch-pro
Copy link

david-koch-pro commented May 24, 2016

Here is my server configuration. (index.js)
screen-shot-2016-05-24-at-10 54 37

And here is my cloud code. (/cloud/main.js)
screen-shot-2016-05-24-at-11 01 44

For testing, I run this command.

screen-shot-2016-05-24-at-11 05 31

Then I got this message.
{"code":141,"error":"XMLHttpRequest failed: "Unable to connect to the Parse API""}

I tried all reference of Git about this problem but couldn't fix this problem. Please help me.......

@KasparasMasiukas
Copy link

Have you configured your process.env.SERVER_URL variable?

@david-koch-pro
Copy link
Author

david-koch-pro commented May 24, 2016

I don't know how to set process.env.SERVER_URL. I thought it would be set automatically.

@david-koch-pro
Copy link
Author

And I could get server log and it was running well.

@KasparasMasiukas
Copy link

Have you looked at .ebextensions/app.config file? Myself I run parse-server on Heroku, I set my environmental variables by using external module - https://www.npmjs.com/package/dotenv

@david-koch-pro
Copy link
Author

david-koch-pro commented May 24, 2016

.ebextensions/app.config
screen-shot-2016-05-24-at-11 24 35

@david-koch-pro
Copy link
Author

david-koch-pro commented May 24, 2016

I already set environmental variables. Can you show me how to use external module?

@KasparasMasiukas
Copy link

If it still doesn't work, I don't know how to help. Perhaps somebody with Elastic Beanstalk expertise will.

@david-koch-pro
Copy link
Author

Please teach me how to use "dotenv". It might be able to help me.

@KasparasMasiukas
Copy link

Please read the instructions on the page I've sent you. I cannot explain any better than that.

@david-koch-pro
Copy link
Author

david-koch-pro commented May 24, 2016

Thank you Kasparas42180
Anybody else? Please help me

@stalehard
Copy link

I have same problem. I use amazon EB as hosting. To fix problem i restart application, but problem again repeated.

Logs:
ParseError { code: 100, message: 'XMLHttpRequest failed: "Unable to connect to the Parse API"' }

@jeffhuangtw
Copy link

You may check the document here:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions-optionsettings.html

Example .ebextensions/options.config
option_settings:

  • option_name: SERVER_URL
    value: 'YOUR_SERVER_URL'

jeskandarian pushed a commit to jeskandarian/parse-server-example that referenced this issue Jan 1, 2017
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

4 participants