Skip to content

andreyvital/horusjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Horus.js

A simple nodejs client for Horus.

Just install with npm

npm install horusjs

Example

var Horus = require('horusjs');
var client = new Horus('udp://0.0.0.0', 7600);

client.send({
  message: 'Hey! This is an awesome message.'
});

The example above will attempt to connect on 0.0.0.0:7600 and send the message. Very simple, and also you can:

client.send({
  tags: ['iOS'],
  message: 'ANDROID IS BETTER!'
});

And you're ready to go. Horus will delivery ANDROID IS BETTER! to everyone tagged with iOS.

...and what about a message to multiple tags?

Just push how many tags you want to tags, and voilà!

client.send({
  tags: [
    'Android', 
    'WindowsPhone', 
    'Blackberry'
  ],
  message: 'Bitch, please, we have React Native.'
});

Currently supported transport strategies

For now we only support UDP as the default protocol.

Packages

No packages published

Languages

  • JavaScript 100.0%