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

Running a cloud function from express route

Open andyburgess1978 opened this issue 10 years ago • 1 comments

Using the new parse server is there a way to call a function in the main.js file from the index.js? Example is to allow an endpoint for a third party so they can post a set of data without needed the application_id or any keys.

Old hosted parse.com allowed like this;

app.post('/test', function(req, res) {
    Parse.Cloud.run('functionname' data);
}

But I cannot get the routing to work in parse-server.

andyburgess1978 avatar Mar 11 '16 15:03 andyburgess1978

It's possible, yeah, and should work, but you have to do something with the response. Not clear what issue you're having here. If you're still having trouble, please open a new issue with more details.

gfosco avatar Mar 18 '16 18:03 gfosco