Code Deployment in Parse provides backend services to developers. If your mobile or desktop app requires a backend on the internet, then Parse is one of the options you can choose.

I first came across this service a few months ago and noted that they provide SDKs that let your apps run on various devices connected to the backend or server. They provide SDKs for devices running iOS, Android, Windows (Phone) 8, OS X and Javascript.

In this blog, I will explore  the basic steps to deploy code in Parse and how developers gain an advantage with this cloud platform.

How to Deploy the Cloud Code


You need a proper configuration to deploy the cloud code. You must follow the following steps.

  1. At first you need to open an account in Parse.The link to the account is
  2. After login,in the Dashboard page you will get an option “Create a new App”.Click on it.
  3. You must give the app a name and create the app.
  4. Then you need to install parse in the local machine.
  5. Open the terminal and paste the following code for installation.

  1.  After installing the parse you will receive a comment like ‘parse new’. Then it will show a message such as –

Would you like to create a new app, or add Cloud Code to an existing app?
Type “(n)ew” or “(e)xisting”: e

1: Test
Select an App to add to config:1

Which of these providers would you like to use for running your server code?:
1) Heroku (
2) Parse  (
Type 1 or 2 to make a selection: 2

Please enter the name of the folder where we can download the latest deployed Cloud Code for your app “**App name**”
Directory Name:

You can either set up a blank project or download the current deployed Cloud Code.
Please type “(b)lank” if you wish to setup a blank project, otherwise press ENTER:
Successfully downloaded Cloud Code to    “/home/*****/Test”.
Successfully configured email for current project to: “Your email address”.

  1. Now go to the parse project where it is downloaded. If you see two folder in the parse project.

The folder structure will be right in this order –


  1. Now write some cloud code inside the main.js.
  2. Then again go into the parse project and inside the terminal command ‘parse deploy’.

First Cloud code

In the main.js file  you will find the first code.

You can run this code in two way.

1. Using curl

2. Using  javascript function

Output of the code is ‘Hello World’.

If you want some modification in the code you need to deploy the parse code again.When you deploy  new code,the previous code will be overwritten by the new one.

The ‘APPLICATION_ID’ and ‘REST_API_KEY’ is already provided in the parse website (inside your parse application).


Here you will get all the keys that you want.

Parse Webhook Application

The most important part in cloud code is webhook.In parse have four types webhook.

  1. Beforesave Triggers.
  2. Aftersave  Triggers.
  3. BeforeDelete Triggers.
  4. AfterDelete Triggers.

Here some example about webhook

1. beforesave webhook

Here is an example of beforesave webhook. In this example you can see that this function executes before any value is saved in the ‘Review’ table. In the review table has ‘stars’ field. User can’t give the star less than 1 and greater than 5.

2. aftersave webhook

Here is example of aftersave webhook. In this example you can see that this function executes after any value is already saved in the ‘Review’ table. In this webhook you can use any operation after the ‘Review’ table’s save operation.

3. beforeDelete webhook

Here is an example of beforeDelete webhook. In this example you can see that this function executes before any value is deleted from the existing table.In this webhook you can use any operation before the following table’s delete operation.

4. afterDelete webhook

Here is the example of afterDelete webhook.In this example you see that when any value is deleted from the ‘Parse.User’ table, after the delete of any value corresponding to ‘Parse.User’ table then the other value is also deleted from the ‘userProfileInfo’ and ‘loanDetails’ table.

Parse Job Scheduler

Another important topic is parse job scheduling. We can do lot of job using parse. Some example are as followed.

In the previous code, you can see that a background job is initialized. In the parse website you can see an option “Job”.The previous code is written inside the main.js file and deployed. In job scheduler you can set your job when it will be run.This is very simple that you don’t bother about the operation. Parse is automatically doing this job based on whatever logic is written  inside the ‘my_job’ function.

Parse Advantage

  1. It is cloud database. You can access it from any platform (iOS and Android).
  2. Parse already provides ParseUser class that can be used to store the data related to the user. Also this class has some inbuilt methods like signUpInBackground , loginInBackground, which you can use to provide signup and login functionality in your app without writing much code.
  3. You can easily store your audio, video and image files on parse server using ParseFile class.
  4. The best feature of this platform is that it is free till your app becomes a super hit. Parse starts charging its users when their app hits the Parse server more than 30 times in one second. This means students and freelancers can use this platform to start without bothering about server side coding and deployment charges.

Parse Disadvantage

  1. Parse is a fully cloud based. If you do not have a good net connection it is a huge problem.
  2. If the parse request take more than 10 second time, then you can also give an error like ‘Request time out’.

As per the latest news Parse is going to be shut down the very next year. But they provide   database migration tools, that let you migrate data from your Parse app to any MongoDB database. During this migration, the Parse API will continue to operate as usual based on your new database, so this can happen without downtime.

Second, parse released the open source Parse Server, which let you run most of the Parse API from your own Node.js server. Once you have your data in your own database, Parse Server let your application running without major changes in the client-side code.

Subhajit Ghosh

Subhajit Ghosh is a senior software engineer at Innofied Solution Pvt. Ltd. He loves to cook but his love for cooking codes is far more than that. He is a codeworm , loves to experiment his coding skills in different languages, keen in taking part at dev fests and summits. He loves what he does, and he does what he loves…and that’s coding.

  • Andrew Agostini

    It is not possible to sign up for a new account with parse to build apps on their platfrom

    • Rahul Dey

      parse is going to be shut down the very next year.Probably they are not allowing open a new account.