1.0.5 • Published 6 years ago

pushfry v1.0.5

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
6 years ago

Installation

$ npm i pushfry

Initialization

Client

const Pushfry = require('pushfry')
const pushfry = new Pushfry('YOUR_API_KEY')

Because of the security reason, please don't add your SECRET_KEY when initializing pushfry in client. You just have to initialize with API_KEY. And make sure you set the initializing origin properly from Pushfry developer console.

Server

const Pushfry = require('pushfry')
const pushfry = new Pushfry('YOUR_API_KEY', 'YOUR_SECRET_KEY')

Usage

Join

const room = pushfry.join('room_name')

Emit

room.emit('channel_name', 'Hello world')

Listen

room.on('channel_name', data => {
  // Handle data
})
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago