Send email or push notification. Provider sync and async function to push or mail.
npm install ah-pusher-plugin --save
npm run actionhero link -- --name=ah-pusher-plugin
Please look config file at config/plugin/ah-pusher-plugin.js
You must setting config/tasks.js
scheduler: true
, minTaskProcessors > 0
and maxTaskProcessors > 0
to use
var options = {
mail: {
to: '[email protected]',
subject: 'Say Hello From AH!'
},
locals: {
body: 'Hello! This is a test mail.'
},
template: 'default'
};
cb(err){
//do something
}
var options = {
deviceIds: [ 'DEVICE_ID' ],
data: {
title: 'New push notification',
message: 'Powered by AppFeel',
otherfields: 'optionally add more data'
}
};
cb(err){
//do something
}