egg-jpush-async

egg的极光推送

Usage no npm install needed!

<script type="module">
  import eggJpushAsync from 'https://cdn.skypack.dev/egg-jpush-async';
</script>

README

egg-jpush-async

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

目前只有推送全部用户。其实写完之后,发现没有这必要,直接用官方 jpush-api-nodejs-client 的就够了!

$ npm i egg-jpush-async --save

Usage

// {app_root}/config/plugin.js
exports.jpushAsync = {
  enable: true,
  package: 'egg-jpush-async',
};

Configuration

// {app_root}/config/config.default.js
exports.jpushAsync = {
  enable: true,
  app: true,
  isDebug: true,
  appName: '123',
  appKey: '123',
  masterSecret: '123',
};

see config/config.default.js for more detail.

Example

await app.jpushAsync.sendToAll('hello world')

Questions & Suggestions

Please open an issue here.

License

MIT