Security News
npm Updates Search Experience with New Objective Sorting Options
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
@pusher/push-notifications-server
Advanced tools
Full documentation for this SDK can be found here
The Beams Node.js server SDK is available on npm here.
You can install this SDK by using npm:
$ npm install @pusher/push-notifications-server --save
Or yarn if you prefer:
$ yarn add @pusher/push-notifications-server
Use your instance id and secret (you can get these from the dashboard) to create a Beams PushNotifications instance:
const PushNotifications = require('@pusher/push-notifications-server');
let pushNotifications = new PushNotifications({
instanceId: 'YOUR_INSTANCE_ID_HERE',
secretKey: 'YOUR_SECRET_KEY_HERE'
});
Once you have created your Beams PushNotifications instance, you can immediately publish a push notification to your devices, using Device Interests:
pushNotifications.publishToInterests(['hello'], {
apns: {
aps: {
alert: 'Hello!'
}
},
fcm: {
notification: {
title: 'Hello',
body: 'Hello, world!'
}
}
}).then((publishResponse) => {
console.log('Just published:', publishResponse.publishId);
}).catch((error) => {
console.log('Error:', error);
});
1.2.3
FAQs
NodeJS Server SDK for Pusher Push Notifications
The npm package @pusher/push-notifications-server receives a total of 8,002 weekly downloads. As such, @pusher/push-notifications-server popularity was classified as popular.
We found that @pusher/push-notifications-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.