This blog post is the first part of a 2 blog posts serie. In this part, we’ll talk about Parse shutting down and going open source. We’ll explore Kinto in the second part.
The shutdown announcement was a surprise for all of us, thankfully the Parse team provided a migration guide and open-sourced the Parse Server. The service will stop working on January 28, 2017, so now it’s time to prepare for the big change. In this post we are going to explain the steps to migrate your Parse-hosted apps to your own Parse Server instances on Scalingo.
parse-server is a Parse-compatible Node.js module made for Express. It is not a stand alone solution but Parse do provide the parse-server-example app that can run out-of-the-box after a git clone.
To setup an instance of Parse Server on Scalingo 2 options are available, the automated one-click deployment and the manual way. We recommand you to use the automated solution to setup your Parse Server which is a great base project customizable in the future.
The automated solution is to use the Scalingo deployment button:
This button will deploy the official parse-server-example project which is suitable to be used for existing Parse app migration. A MongoDB instance will be provisionned automatically for you during the process.
Follow these simple steps to setup your own Parse Server:
If you want to use the deployed application as a base to your project you can git clone
it. The command is git clone git@scalingo.com:my-parse.git
where my-parse
is the app name you gave earlier. You can now make change to the cloned project such as adding some Cloud Code. To deploy your changes just do a git push scalingo master
and your app will be updated.
To follow the following steps you will need the Scalingo CLI. If you prefer using a GUI, steps 2 to 4 can be done in Scalingo Dashboard.
scalingo create my-parse
scalingo addons-add scalingo-mongodb free
scalingo env-set DATABASE_URI='$SCALINGO_MONGO_URL'
git push scalingo master
Once you’ve setup your Parse Server on Scalingo it’s time to migrate your Parse-hosted app. Be sure to read the official Migrating an Existing Parse App guide first to understand the process. The following points are the big steps that must be done to successfully migrate to a Scalingo hosted Parse Server.
To allow your client apps (iOS, Android, web, etc.) to access your own Parse Server, you’ll have to change the server URL in each of your client apps to the Scalingo app URL (e.g. my-parse.scalingo.io). Instructions for each SDK are detailed in Using Parse SDKs with Parse Server.
By default, Parse Server will serve the Parse API on /parse
. To change this, or if you are using older client SDKs, you can run scalingo env-set PARSE_MOUNT=/1
. This command will set the environment variable PARSE_MOUNT
to the value of /1
.
On Scalingo, databases are not publicly accessible for security reasons, so the process described in the official migration guide will not work. Instead, you’ll have to manually transfer the data to your Scalingo MongoDB instance. Here are the steps:
$ scalingo db-tunnel SCALINGO_MONGO_URL
Building tunnel to my-parse-4727.mongo.dbs.appsdeck.eu:31068
You can access your database on '127.0.0.1:10000'
{ "results":
and }
that wrap the array containing your collection data.--db
, --collection
, --file
, --username
, --password
). To find out the password to your database you can use the commandscalingo env | grep MONGO
.$ mongoimport --db my-parse-4727 --port 10000 --username my-parse-4727 --password 6O65xJH3_k2qu0DeIfxg --collection yourcollection --file yourcollection.json --jsonArray
connected to: 127.0.0.1:10000
2016-02-01T18:45:47.073+0100 imported 9999 objects
By following the official Parse migration guide and this blog post you should now have a working Parse Server. As mentionned by the Parse team, the migration will not be easy for everyone, you should conduct tests to ensure your data is consistent and your Cloud Code still work. We hope by providing a quickly deployable solution on Scalingo will help you ease the transition.
An interesting Parse alternative is the Mozilla backed Kinto that we will discuss in the second blog post tomorrow.
UPDATE: The second part is online.
At Scalingo (with our partners) we use trackers on our website.
Some of those are mandatory for the use of our website and can't be refused.
Some others are used to measure our audience as well as to improve our relationship with you or to send you quality content and advertising.