Parse server configuration options

You can customize your parse server initialization from cloud code. This provides you the flexiblity to use custom modules such as an external push service provider and also possibly dynamically configure the parse server.

The below example provides an example on how to configure an external push service such as onesignal for your parse server. You can adopt this example for other use cases as well.

var OneSignalPushAdapter = require('parse-server-onesignal-push-adapter'); // you can set custom environment variables from the dashboard by navigating to // app actions > environment variables var oneSignalPushAdapter = new OneSignalPushAdapter({ oneSignalAppId: process.env.ONE_SIGNAL_APP_ID, oneSignalApiKey: process.env.ONE_SIGNAL_API_KEY }); Server.setConfigureOption('push', { adapter: oneSignalPushAdapter });

Steps to deploy

1. Save the above code in a file with name appconfig.js under your cloud folder

2. Deploy your cloud code as described above