@parse-push/parse-baidu-push-adapter

1.0.2 • Public • Published

parse-baidu-push-adapter

This package works seamlessly with parse-server to send push notification using GCM/FCM and Baidu to any android device and also supports APNS

Getting Started

npm install @parse-push/parse-baidu-push-adapter

Configure the parse-server to use Baidu push server by setting this config parameter

Along with these parameters below add pushServer : "baidu"

const PushAdapter = require('@parse/parse-baidu-push-adapter').default;

const pushOptions = {
  ios: { /* iOS push options */ } ,
  android: { /* android push options */ }   
}

const pushServer = "baidu";

const options = {
  appId: "****",
  masterKey: "****",
  push: {
    adapter: new PushAdapter(pushOptions, pushServer)
  },
  /* ... */ 
}
 
const server = new ParseServer(options);

If you wish to use GCM/FCM then just remove the pushServer config that is all

Package Sidebar

Install

npm i @parse-push/parse-baidu-push-adapter

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

40 kB

Total Files

9

Last publish

Collaborators

  • prostil
  • umshnk