Package Exports
- @feathers-nuxt/feathers-notifme
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@feathers-nuxt/feathers-notifme) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
feathers-notifme
Feathers notification service using
notifme-sdk
Installation
npm install @feathers-nuxt/feathers-notifme --save
API
const notifme = require('feathers-notifme');
app.use('/notifications', notifme(options))
options
is an object with two optional keys
- useNotificationCatcher: optional boolean.
false
by default. - channels: optional object. One of
email
,sms
,push
,webpush
orslack
Each channel configuration is an object with two keys: - multiProviderStrategy: optional string; one offallback
,roundrobin
,no-fallback
- providers: required array of objects each with a required keytype
See here for more details.
Example
The below example is in livescript.
notifme = require 'feathers-notifme'
# declare notifme-sdk options
options =
useNotificationCatcher: false
channels:
email:
providers:
* type: 'logger'
* type: 'smtp',
port: 465,
secure: true,
host: (app.get 'SMTP_HOST'),
auth: user: (app.get 'SMTP_USER'), pass: (app.get 'SMTP_PASSWORD')
...
# register the service with the options
app.use '/notifications', notifme options
# use the service to send email notification
alert =
email:
subject: 'Test Email Notification'
from: app.get 'SMTP_USER'
to: email@address.me
html: 'Hello world!'
(app.service 'notifications').create alert
License
Copyright (c) 2018
Licensed under the MIT license.