user2202911
user2202911

Reputation: 3014

Difference between parse.com cloud code and rest api

I am interested in using parse and am a little confused as to the difference between their products.

I am looking to run server code on the platform and I can see that there is a cloud code option as well as a REST api option.

What is the difference between the two? For me it it seems as though they are the same in the sense that they both run server code

Upvotes: 0

Views: 295

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191681

Cloud Code allows you to define JavaScript functions that run server-side.

These methods are exposed to the REST interface, so your confusion is valid, but you only put/request information via REST, not perform logic.

So say you defined a Cloud Code method to run before you saved a Parse Object. When you make a PUT request through REST with your object body, that Cloud Code method will run.

Upvotes: 1

Related Questions