Mario Mouris
Mario Mouris

Reputation: 317

Parse Index.js and Cloud code

This may be a stupid question... But I don't know where to find the index.js file and the main.js file of the cloud code in my parse android project.

Upvotes: 2

Views: 814

Answers (1)

Cliffordwh
Cliffordwh

Reputation: 1430

If you using parse.com :

You need to use parse.com command line tool: you edit locally in your machine, and then deploy your code. More info, in parse.com documentacion: https://parse.com/docs/js/guide#cloud-code

If parse-server:

https://github.com/ParsePlatform/parse-server

Configure your servers path on initilization. Then in the main.js you can place your code. Remember there is many ways to initilize the server. Just read the docs on the repo to better understand it.

cloud: '/home/myApp/cloud/main.js', // Absolute path to your Cloud Code

Use a ftp client to make things easier when editing the file etc. remember when making changes to the main.js file you will need to restart the parse-server again.

For Heroku:

Alot easier, just use there backend to set path for the cloud code. If the main.js file doesnt exsist. Just create your own one and stipulate a path to that file using the variable editor in Heroku backend.
enter image description here https://devcenter.heroku.com/articles/deploying-a-parse-server-to-heroku#configuring-your-parse-server-with-config-vars

Upvotes: 1

Related Questions