parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

How to call cloud code from localhost parse server?

Open atom2ueki opened this issue 10 years ago • 3 comments

I'm migrating my cloud code to my localhost parse server, follow the guide copy cloud code to the cloud/main.js, but how can I call the defined function inside?

curl -X POST \
-H "X-Parse-Application-Id: myAppID" \
-H "X-Parse-REST-API-Key: myRestApiKey" \
-H "Content-Type: application/json" \
-d '{}' \
http://localhost:5000/parse/1/functions/hello

atom2ueki avatar Feb 02 '16 02:02 atom2ueki

Drop the /1/ and this should work. /1 was the path on api.parse.com, but in parse-server the default is just /parse

http://localhost:5000/parse/functions/hello

gfosco avatar Feb 02 '16 02:02 gfosco

@gfosco I see, it works, thanks

atom2ueki avatar Feb 02 '16 02:02 atom2ueki

@gfosco I am getting successful cloud function calls also when providing a wrong REST Api key. Is this supposed to happen?

oyvindvol avatar Sep 14 '16 07:09 oyvindvol