2

I followed the instruction of parse.com to create a new site including cloud code and public. The static page works. But the cloud code doesn't work.

Here is the code in main.js:

Parse.Cloud.define("hello", function(request, response) {
  response.success("Hello world!");
});

And I'm using curl to test this code after I run parse deploy.

curl -X POST \
  -H "X-Parse-Application-Id: t14gtZouSBVNPbFI5JanDHmLYk9iD9ceAkbr0ON2" \
  -H "X-Parse-REST-API-Key: IYt8Z03n44pVsuJ9vlL6yXz5qDVmZAEqht8q2VPf" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://api.parse.com/1/functions/hello

It returns:

{"code":141,"error":"function not found"}

Any idea? Thanks

Bagusflyer
  • 12,675
  • 21
  • 96
  • 179
  • There's a lefthand tab on their site (in the "core" section) called "cloud code". Please look there to see if the function is really there as expected. – danh Apr 09 '15 at 14:51

1 Answers1

-1

You can try to call "classes" to get access from curl to your Cloud functions: https://api.parse.com/1/classes/hello

Peter Zverkov
  • 145
  • 1
  • 6