Kodeco Forums

Migrating to Parse Server

Parse recently announced it's shutting down its service. This Parse server tutorial explains how to migrate to Parse Server, an open source alternative.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1178-migrating-to-parse-server

Hi!
How to setup a job on parse server?

Iā€™ve been learning Gamesparks and loving it!

1 Like

I have migrated parse database on objectrocket but now i want to replace it with mlab on heruko. How can i do that?

Awesome. Thank you. One follow up question:

Why have two apps in the dashboard config? As I have it set up below, my ā€œlocalā€ dashboard actually updates the mongo DB on the server. The ā€˜herokuā€™ dashboard is emptyā€¦ probably because I donā€™t have the correct serverURL.

{
ā€œappsā€: [
{
ā€œserverURLā€: ā€œWHAT_GOES_HEREā€,
ā€œappIdā€: ā€œshhhā€,
ā€œmasterKeyā€: ā€œshhhā€,
ā€œjavascriptKeyā€: ā€œshhhā€,
ā€œrestKeyā€: ā€œshhhā€,
ā€œappNameā€: ā€œAppName-Herokuā€
},
{
ā€œserverURLā€: ā€œhttp://localhost:1337/parseā€,
ā€œappIdā€: ā€œshhhā€,
ā€œmasterKeyā€: ā€œshhhā€,
ā€œappNameā€: ā€œAppName-Localā€
}
]
}

@ ranapnm
If you cloned your app and backed up your data in Parse before migrating to ObjectRocket, then you can repeat the process described in this tutorial for mLab. If you did not clone/back up your app on Parse before migrating, Iā€™m not sure.

My images didnā€™t transfer over. Do you know if there is a way to do that? I rely on several hundred in my appā€¦ Thanks

@kschlagel Currently there is no ā€œone-clickā€ solution to transfer your images yet. You could transfer the images yourself by writing a script that should be fairly simple, e.g. simply loading and storing your images will store them on the new destination. That destination is your Parse Serverā€™s mondoDB file system by default or a 3rd party storage provider if you have set up a storage adapter with your Parse Server. However I expect the developer community to come up with an easy general solution to transfer from Parse.comā€™s S3 storage to another one in a couple of months, for now everyone is focused on stabilizing the still young Parse Server.

1 Like

@ranapnm Once your data is migrated off Parse.com is it not as easy anymore to migrate it to another database. Also it will be harder to do it without down-time for your users. You can dump the data from the current database and import it into your new database. Then in your Parse.com dashboard update the database connection string in ā€œApp Settings > General > Change connection stringā€ so that the Parse.com API endpoint redirects to the new database on mLab. That will result in a down-time for your app until the process is completed. There are a number of things to consider so I recommend you are trying this process with dummy data first. The guys at mLab are super helpful, so ask them in case you get stuck - data export / import wise.

Stuck at this part:

ā€œNow that youā€™ve wired it up, you need to test if the Parse Server is talking to the remote database. Remember to insert your Application ID from the Parse.com dashboard:ā€

I had everything up until then work perfectly, what am I missing?

I did curl -X GET \, then -H "X-Parse-Application-Id: <myAppId>" \ with my App ID in the required spot, then -H "Content-Type: application/json" \ and -d '{}' \, then Iā€™m not sure if Iā€™m supposed to be replacing anything in this line http://localhost:1337/parse/classes/Player but everything Iā€™ve tried so far has given me this error: ā€œcurl: (7) Failed to connect to localhost port 1337: Connection refusedā€.

Any ideas? Thanks!

Great tutorial. So I have notifications working using curl, but how can we send notifications directly from the app using Swift as we used to?

1 Like

Hey, every time I run the curl command I get {ā€œerrorā€:ā€œunauthorized: master key is requiredā€}. Iā€™ve include my master key in the app delegate, index.js, and the command itself. Any Idea on what Iā€™m doing wrong?

HI, thanks so much for the tutorial. Please I need some help.
After migrating the server to Heroku, and I type this command
$ curl -X GET
-H ā€œX-Parse-Application-Id: ā€
-H ā€œContent-Type: application/jsonā€
-d ā€˜{}ā€™
https://.herokuapp.com/parse/classes/WallPost

, I received data from the remote server. However, my app does not receive any data. Please is there any configuration i need to do on Heroku for this to work?

Please use the following link:

1 Like

Hi Ray,

Thanks for the great tutorial. I successfully migrated one of my Parse.com apps however Iā€™m in need of some help. Apple recently rejected my app because the Parse.com API threw an error when ā€œconnected via IPv6 wifiā€. Do you know if Parse Server or Parse.com supports IPv6?

When I use the following tool: http://ready.chair6.net, both my Parse.com hosted address AND Heroku hosted address ā€œfailsā€ IPv6. Otherwise, I donā€™t know how to get my app approved. Please help. Thank you!

I have a question, and I realize it may be a basic oneā€¦ Regarding the following step in the tutorial:

ā€œNext, in the root folder of the ParsePlatform project, open index.js and replace the default database string with your MongoDB database URI:ā€

Do I open the index.js file that is in the Parse folder in the root directory of my mac? Is that what you meant?

Thanks!

Parse Server does not support Jobs. You can try to use some open source NodeJS modules like Kue or a Parse Service hosting like Back4App.

Its not possible to send notifications from your App. You have to write a cloud code function that send these notifications and call this function on your App.

Hello - in the section ā€œGetting Startedā€, I am trying to run the Parse Starter project in Xcode. What is it expecting for username/password? When I supply my own valid Parse.com credentials, I get an ā€œauthorization errorā€. Any ideas for me? Thank you.