NodeChef provides a CLI which can be used to update your Cloud Code files using a single command. The directory structure for your code files does not change, all cloud code files should be under the Cloud directory. The contents of the public folder are rather sent to the load balancer instead (You can overide this behaviour). Static assets can be served directly from the load balancer for the best performance. You can even configure routes on the load balancer such that /privacy points to privacy.html and so on. You no longer have to hard code routing for static assets.
Parse.Cloud.job can only be invoked from the jobs.js module. Invoking this function from the main or any other module will throw an undefined exception.
The minimum requirement to use cloud code is the main.js module. app.js and other example .js modules used in this documnetation are only for demonstration purposes.
The minimum requirement to run jobs is the jobs.js module.
If your app container is in the exited(1) state after deploying cloud code, check your app logs for details on the crash. Exited(1) means your app is not running and requires your attention to fix the defect.
If you prefer to use the dashboard without touching the CLI, you can upload your cloud code from the dashboard by following the below steps:
From the command prompt or terminal, CD into the directory which contains the cloud folder and run the below command: