Node Beaconpush

node.js client for Beaconpush (a cloud hosted service for browser push messaging with Web Sockets and Comet)
Alternatives To Node Beaconpush
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Netmq2,68024113810 days ago64July 04, 202297otherC#
A 100% native C# implementation of ZeroMQ for .NET
Libvma455
25 days ago38otherC++
Linux user space library for network socket acceleration based on RDMA compatible network adaptors
React Discord Clone397
3 months ago14gpl-3.0TypeScript
Discord Clone using React, Node, Express, Socket-IO and Mysql
Nullmq272
11 years ago2mitJavaScript
ZeroMQ-like sockets in the browser. Used for building gateways and generally applying ZeroMQ philosophy to browser messaging.
Robust Services Core135
6 months ago45gpl-3.0C++
Robust applications framework in C++. Includes a static analysis tool and two applications.
Semaphore107
14 days ago11April 27, 2022agpl-3.0Python
A simple (rule-based) bot library for Signal Private Messenger.
Faye Redis Ruby798634 years ago3October 01, 20137Ruby
Redis engine backend for Faye
Railschat77
6 years ago2Ruby
Real-time Rails-based Webchat for Instant Messaging (实时Web聊天室)
Angularjs Chat72
414 days ago10February 03, 20166mit
AngularJS Chat - Enable chat messaging experiences in your iOS, Android and Web apps.
Faye Redis Node634356 years ago5October 01, 20138JavaScript
Redis engine backend for Faye
Alternatives To Node Beaconpush
Select To Compare


Alternative Project Comparisons
Readme

node-beaconpush

A fast and easy-to-use node.js client for Beaconpush, a cloud hosted service for browser push messaging with Web Sockets.

Example

Sends a message to a connected web browser:

var bp = require('beaconpush');

// Create a new client
var beaconpush = new bp.Client('<your-api-key>', '<your-secret-key>');

// Send a 'chatMessage' to user 'romeo'
beaconpush.user('romeo').send({chatMessage: 'ZOMG'});

A more detailed chat example is available in the examples directory.

What is Beaconpush?

Beaconpush is a cloud service offering push messaging in any web browser. Send messages in real-time to any browser by using a simple REST API. Integrates smoothly with all existing web frameworks and libraries.

  • No requirements
    Just embed a couple of lines of JavaScript on your web site. No software, no servers required.

  • Works in any browser
    Excellent browser compatibility no matter what. If Web Sockets isn't available, it will automatically try other transport alternatives.

  • User and channel presence
    First-class support for users making real-time, social sites a snap to create. Detect if user is online/offline or create chat rooms!

  • Scalable
    With high-performing, custom-written push server technology, Beaconpush will take care of all scalability needs for you.

Read more on beaconpush.com

Installation

With Node Package Manager installed, just type:

npm install beaconpush

API Examples

var bp = require('beaconpush');

// Create a new client
var beaconpush = new bp.Client('<your-api-key>', '<your-secret-key>');

// Get number of users currently connected to your site
beaconpush.usersConnected(function (err, numConnected) {
  console.log('There are ' + numConnected + ' users online');
});


// Get a user object where you do user operations
var user = beaconpush.user('julia');

// Send a stock quote to user 'julia'
user.send({stock: {symbol: "GOOG", quote: 34.2}}, function (err, numDelivered) {
  console.log('Delivered ' + numDelivered + ' message(s)');
});

// Check if user is online
user.isConnected(function (err, connected) {
  console.log('User ' + user.name + ' is ' + (connected ? 'connected' : 'not connected'));
});

// Disconnect user
user.disconnect(function (err, connected) {
  console.log('User ' + user.name + ' was disconnected');
});


// Get a channel object for doing channel operations
var channel = beaconpush.channel('chat');

// Send a chat message to channel
channel.send({chatMessage: {to: "romeo", from: "julia", message: "Oh, Romeo!"}}, function (err, numDelivered) {
  console.log('Delivered ' + numDelivered + ' message(s)');
});

// Get users connected to a channel
channel.usersConnected(function (err, users) {
  console.log('Users online ' + users);
});
<script src="https://gist.github.com/836224.js?file=node-beaconpush_example.js"></script>

Authors

License

Open-source licensed under the MIT license (see LICENSE file for details).

Popular Socket Projects
Popular Messaging Projects
Popular Networking Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Cloud Computing
Coffeescript
Socket
Messaging