Add support for push

This commit is contained in:
wangmengyan95
2016-02-08 12:02:07 -08:00
parent dea7bb5c18
commit 6afaeb808b
10 changed files with 530 additions and 64 deletions

View File

@@ -5,6 +5,7 @@ var batch = require('./batch'),
cache = require('./cache'),
DatabaseAdapter = require('./DatabaseAdapter'),
express = require('express'),
PushAdapter = require('./Adapters/Push/PushAdapter'),
middlewares = require('./middlewares'),
multer = require('multer'),
Parse = require('parse/node').Parse,
@@ -86,6 +87,10 @@ function ParseServer(args) {
cache.apps[args.appId]['facebookAppIds'].push(process.env.FACEBOOK_APP_ID);
}
// Register push senders
var pushConfig = args.push;
PushAdapter.getAdapter().initialize(pushConfig);
// Initialize the node client SDK automatically
Parse.initialize(args.appId, args.javascriptKey || '', args.masterKey);
if(args.serverURL) {