2

so I am quite new to programming and am trying to set up a parse dashboard through Heroku and link it to my Xcode project.

I first went to github and clicked the button deploy to heroku https://github.com/ParsePlatform/parse-server-example I then set up my app with all the relevant details like appID, masterKey etc

After this, I downloaded the blank Xcode project from the parse website and filled out my details (appId etc)

The project ran successfully and data was sent to Heroku under Heroku mongoDB.

Then to set up my parse-dashboard, I installed parse-dashboard in terminal by doing the following commmand: 'sudo npm install -g parse-dashboard' After this I put in the following details in terminal: appId ... --masterKey ... --serverURL ... --appName ...

I then followed the url to my parse dashboard and was given the error message "server not reachable: server version too low"

Does anyone have any suggestions on how to fix this? If you could bear in my mind the fact that I am new to programming in your answer, that would be great!

Thanks in advance.

Archie

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

2

You have to update your Parse Server to a newer version in order for it to work with the Parse Dashboard.

Basics

Heroku is very convenient in that you deploy code using a versioning system, most popular git. If you are not using it yet for developing code it is very recommendable to take a look at it as it will structure and simplify your code development work.

The Deploy button on Heroku created a Parse Server of the version that was available at that time. It will not automatically update when a new version of Parse Server becomes available. This would also not be wanted because as a developer you would want to test if your code is compatible with the new version of Parse Server. Sometimes you might have to tweak your code here and there - that is what the change log of Parse Server is for that is always good to read before updating to the new version.

Update Parse Server

To update Parse Server you will have to fetch the current deploy of Parse Server that is on Heroku to your local computer.

  1. Install git; for the rest of these instruction I will assume you are using a Mac.
  2. Open Terminal
  3. Clone the repository on Heroku that is your current deploy of Parse Server: git clone https://git.heroku.com/<YOUR_HEROKU_APP_NAME>.git parse-server
  4. Navigate into the parse-server directory: cd parse-server
  5. Add the repository of Parse Server Example as a remote: git remote add upstream https://github.com/ParsePlatform/parse-server-example.git
  6. Fetch the parse-server-example repository: git fetch upstream
  7. Merge your local parse-server code into the currently lastest version of Parse Server: git merge upstream. If you are getting merge conflict messages at this point then resolve them by referring to here.
  8. Push the updated local version of Parse Server back to Heroku: git push heroku. This can take some time and will restart your Heroku dynos. You can open the Logs on the Heroku dashboard to see if the Parse Server is restarting successfully. If there are errors you can correct them by editing the corresponding files locally, commiting the changes and pushing again to Heroku as you did in this step.

Note:

Parse Server is currently at 2.2.9. If you have a live app it would be recommendable to test if your app still works after the update in a test environment prior to the production environment .

Community
  • 1
  • 1
Manuel
  • 14,274
  • 6
  • 57
  • 130
  • Thanks Manuel. However, I am not sure I completely understand all the steps. How do I add the original server as a remote repository and how do I fetch changes from this repository? Thanks – Archie Judd May 15 '16 at 09:54
  • Are you familiar with git? – Manuel May 15 '16 at 09:57
  • No. Do you have any suggestions on where I should start? – Archie Judd May 15 '16 at 12:55
  • Thank you so much for this. However, when I clone the repository from Heroku, it says 'you appear to have cloned an empty repository'. I then followed the steps successfully until 'git merge upstream' and was given the error message: 'not something we can merge'. Any ideas? – Archie Judd May 15 '16 at 22:03
  • The repository should not be empty. You can try installing Heroku Toolbelt which lets you manage your Heroku apps from the Terminal and get the current deploy. Go ino your parse-server directory and enter `heroku login`. Then enter `heroku git:clone -a `. Then continue with step 4. – Manuel May 15 '16 at 22:20
  • Maybe this also helps you: http://stackoverflow.com/questions/35389389/how-can-i-host-my-own-parse-server-on-heroku-using-mongodb – Manuel May 15 '16 at 22:28