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.
-
I think its important to provide more information with regards to your setup. Are you running parse-server or using Parse.com? – Cliffordwh Dec 05 '16 at 12:50
-
@SnakeBlisken I don't actually know the difference, but I think it may be Parse.com – Mario Mouris Dec 05 '16 at 12:51
-
Well the one is the current service from parse.com ( soon to expire ) or your own environment ( hosting ) with the open source server installed on it. https://github.com/ParsePlatform/parse-server/ – Cliffordwh Dec 05 '16 at 12:54
-
@SnakeBlisken Ohh, then I'm hosting my own environment. – Mario Mouris Dec 05 '16 at 13:22
-
where is your environment hosted? AWS, Heroku, Local? – hybrdthry911 Dec 06 '16 at 01:02
-
@hybrdthry911 Heroku – Mario Mouris Dec 06 '16 at 08:23
-
@user3049535 Did you find out how to get a hold of the cloud code? I'm stumped on the same problem. – grantespo Jan 02 '17 at 00:44
1 Answers
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.
https://devcenter.heroku.com/articles/deploying-a-parse-server-to-heroku#configuring-your-parse-server-with-config-vars

- 1
- 1

- 1,422
- 1
- 10
- 18
-
-
-
1I have set up ParsePush in my app but it does not send because I think I need to configure a index.js file. How do I do this for Heroku? I'm confused. – grantespo Jan 01 '17 at 23:25