Configuration

A Parse on Buddy app consists of two main sets of data: class (database) data, and manual configuration. Here is a listing of the manual configuration you can make to your app after you create it in the dashboard, and associated documentation:

Cloud Code/Web Hosting – https://buddy.com/mobile-backend/cloud-code-web-hosting/

Webhooks – https://buddy.com/mobile-backend/webhooks/

Background Jobs – https://buddy.com/mobile-backend/cloud-code-web-hosting/background-jobs-scheduling/

Push Notifications – You need to manually enter iOS & Android push notification credentials. https://buddy.com/mobile-backend/push-configuration/

Account verification/password reset emails

To use this feature you need a SendGrid or Mailgun API key. To get a Sendgrid API key, create an account at https://sendgrid.com. Then go to https://app.sendgrid.com/settings/api_keys to create an API key. Copy/paste that API key into the Parse on Buddy dashboard, under App Settings -> Email. For Mailgun, go to https://app.mailgun.com/app/dashboard to create an account. Then create a Sending Custom Domain and verify it. Copy/paste the domain and the Secret API Key into the Parse on Buddy dashboard. For both SendGrid and Mailgun, be sure to add a Reply-to address to the Parse on Buddy dashboard.

Facebook login

Contact [email protected] with your Facebook app’s ID, and your Parse on Buddy app ID and name, so we can configure your Parse on Buddy app. Then configure your Facebook app as follows:

  • Log in to your Facebook app at https://developers.facebook.com/apps/
  • Under SettingsBasic, scroll down to see Website. If it exists, see the Site URL edit box. If Website doesn’t exist, click on Add Platform, then select Website.
  • In the Site URL edit box under Website type in the following URL: https://parse.buddy.com

Twitter login

Contact [email protected] with your Twitter app’s Consumer (API) Key & Consumer (API) Secret, and your Parse on Buddy app ID and name, so we can configure your Parse on Buddy app. Then configure your Twitter app as follows:

  • Log in to your Twitter app at https://apps.twitter.com/
  • Under your app, go to Settings, and ensure the Callback URL has a value.
  • Ensure the Enable Callback Locking checkbox is unchecked

Express support

To use Express in your apps, include the Express package and initialize it as you would in node.js. You can set the views property if you want to place your views in a directory other than the default cloud directory. Keep in mind that this initialization code should not be contained in a cloud code function or background job. Here’s an example of initializing Express in cloud code:

var Express = require("express");
var app = Express();

app.set("views", "cloud/views"); // if you want to place your views in a subdirectory to the ‘cloud’ directory

app.set("view engine", "ejs"); // be sure to include the ‘ejs’ package via ‘npm install ejs’, if you are using this template package

app.get("/", function(req, res) {
res.status(200).send("I dream of being a web site.");
});

app.get("/offers", function(req, res) {
res.render("offers");
});

app.listen(3000);

 
The root URL for the Express endpoint in your cloud code is https://{your app ID}.parse.buddy.express. In the above example, for an app with an app ID of ‘f9fb1be4-1477-46cf-8654-872ac170ebbb’, the ‘offers’ template will have the following URL: https://f9fb1be4-1477-46cf-8654-872ac170ebbb.parse.buddy.express/offers. Note that ‘.express’ is used as a top-level domain to ensure security between apps; *.buddy.express is owned and controlled by Buddy.