-2

I am currently setting up Parse Cloud Code and I have gotten to the final step which is to deploy the main.js file but when I do this it just opens the file in Adobe Dreamweaver?

3 Answers3

4

I was having problems understanding how to deploy the main.js file.

Read the following steps: https://www.parse.com/apps/quickstart#cloud_code/unix

It contains:

Get the Parse tool Download the command line tool by running this command: curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash This installs a tool named parse to /usr/local/bin/parse. That is the only thing that's added, so to uninstall, just delete that file. Running this command will also update your existing Parse command line tool if you already have it installed. Set up a Cloud Code directory Open a new terminal window, run the command parse new and follow the instructions.

$ parse new

Please login to Parse using your email and password. Email: ninja@gmail.com Password (will be hidden): Would you like to create a new app, or add Cloud Code to an existing app? Type "new" or "existing": existing 1:MyApp 2:MyOtherApp Select an App to add to config: 1 Awesome! Now it's time to setup some Cloud Code for the app: "MyApp", Next we will create a directory to hold your Cloud Code.

Please enter the name to use for this directory, or hit ENTER to use "MyApp" as the directory name.

Directory Name: MyCloudCode Your Cloud Code has been created at ${CLOUD_CODE_DIR}. Next, you might want to deploy this code with

"parse deploy"

. This includes a "Hello world" cloud function, so once you deploy you can test that it works, with:

curl -X POST \ -H "X-Parse-Application-Id: ${APP_ID}" \ -H "X-Parse-REST-API-Key: ${REST_API_KEY}" \ -H "Content-Type: application/json" \ -d '{}' \ https://api.parse.com/1/functions/hello

$ cd MyCloudCode

TheRealRonDez
  • 2,807
  • 2
  • 30
  • 40
  • I run "parse deploy", but for some reason my system returns Command must be run inside a Parse project... Where should I be running this within the terminal? – Liam Shalon Oct 03 '15 at 21:04
2

Go to the directory where your Main.js file does exist and use command $parse deploy to deploy your code on parse cloud.Refer this link if you are using Linux system.https://www.parse.com/apps/quickstart#cloud_code/unix and use this link if you are using windows system https://parse.com/apps/quickstart#cloud_code/windows. Hope it will help.

Mansuu....
  • 1,206
  • 14
  • 27
1

As far as I understand from your question, you want to deploy the main.js file to the Parse cloud. The problem that you face opening in Adobe Dreamweaver is related with your computer where you configure the file open with the Adobe Dreamweaver.

The answer to your question is; as detailed in Parse Cloud tutorial, first you have to install Parse command line tool. This tool enables you to manage your code in Parse cloud. Then you can use "parse new" command to set up a cloud directory where you have to replace the main.js file with your own. Following that "parse deploy" will deploy your js file to the Parse cloud. You can find detailed information in tutorials Parse Cloud. Hope this helps.

Regards.

kingspeech
  • 1,776
  • 2
  • 14
  • 24