Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-server-azure-push

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-server-azure-push

A Parse Server push adapter using notification hubs

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status Dependency Status

Parse Server Azure Push

This module provides push capabilities for parse server via azure notification hubs.

Add to your parse app like so:

var azurePushAdapter = require('parse-server-azure-push');
var ParseServer = require('parse-server').ParseServer;
var express = require('express');

var server = new ParseServer({
    //... other config values ...
    push: azurePushAdapter({
        ConnectionString: 'notification hub connection string',
        HubName: 'notification hub name'
    })
});

If you do not want to explicitly specify a connection string or hub name, they can be specified via environment variables:

  • ConnectionString: process.env.CUSTOMCONNSTR_MS_NotificationHubConnectionString
  • HubName: process.env.MS_NotificationHubName

Sending WNS Pushes

This module has the capability to send pushes to Windows devices. The default behavior is to send toast notifications:

Parse.Cloud.define('myPushFunction', (req, res) => {
    // sends a toast notification with text 'my toast notification'
    Parse.Push.send({
        channels: [ 'someChannel' ],
        data: {
            alert: 'my toast notification'
        }
    }, { useMasterKey: true })
    .then(res.success)
    .catch(res.error);
});

If you would like to send more advanced WNS notifications, you can through the use of the 'wns' object:

// sends a raw notification with custom wns header
Parse.Push.send({
    channels: [ 'someChannel' ],
    data: {
        alert: 'apple or gcm alert'     // ignored if 'wns.data' exists for windows installations
    },
    wns: {
        type: 'raw',                    // adds the X-WNS-Type: 'wns/raw' header
        data: 'my raw notification',    // the wns payload
        headers: {                      // custom headers to be sent to WNS
            'X-WNS-Cache-Policy': 'cache'
        }
    }
}, { useMasterKey: true });

FAQs

Package last updated on 12 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc