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

Heroku Cloud Code Access #2945

Closed
listingboat opened this issue Oct 26, 2016 · 4 comments
Closed

Heroku Cloud Code Access #2945

listingboat opened this issue Oct 26, 2016 · 4 comments

Comments

@listingboat
Copy link

I have an app that is a node/express app written on top of cloud code. It is deployed and functional on Heroku. However, we get random performance issues. I suspect this is due to the fact that the cloud code is competing with external web requests to the same URL.

In our config, the serverURL is set to https://.herokuapp.com. Which mean the Parse cloud code calls to parse are going out over the internet instead of directly to localhost.

Is there a serverURL config that would work for localhost on Heroku. My many attempts have failed.

@flovilmart
Copy link
Contributor

try localhost:8080 or whatever port is heroku listening on. Otherwise, you can try to use PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS=1 as an environment variable.

This removes the HTTP roundtrips with CloudCode <-> parse-server.

Before using that, you have to make sure that your cloudCode doesn't contain Parse.Cloud.useMasterKey() and Parse.User.current()

@listingboat
Copy link
Author

I am aware of the experimental direct access. I understand it is slated for version 3.x is that correct?

@flovilmart
Copy link
Contributor

it's available right now, protected by the env variable. It's scheduled for a later version.

@hramos hramos closed this as completed Nov 29, 2016
@woodardj
Copy link

woodardj commented Jul 5, 2017

Sorry for jumping on an old thread — to clarify, the reason not to use "useMasterKey" with PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS is because it's a security risk? Is that accurate?

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