egg-sms
Install
$ npm i egg-sms --save
Usage
// {app_root}/config/plugin.jsexportssms = enable: true package: 'egg-sms'
Configuration
// {app_root}/config/config.default.jsexportssms = client: accessKeyId: 'your access key' secretAccessKey: 'your access secret'
see config/config.default.js for more detail.
API
detail on ali doc here
- sms.sendSMS(params)
- sms.queryDetail(params)
- sms.receiveMsg(params)
Example
You can acquire sms instance on app
or ctx
// {app_root}/app/controller/sms.js ... async { await thisctxsms } ...
Questions & Suggestions
Please open an issue here.