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