No commit activity in last 3 years
No release in over 3 years
Node notification server integration library for ruby project
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

Notification Server ruby integration

Travis status

Ruby integration with nodejs based "notification-server" You can get details information about notification server from here

In brief

Notification server is an implementation of nowjs based messaging service, Using this you can easily publish messages to all web based subscribers.

FYI,

Nowjs is a wrapper around socket.io which has implemented HTML5 Websocket based API, also for fallback it supports wide rage of other choices. (ie. flash socket, json-polling etc..)

We've built this service so that we could send out live server changes to all running clients (which are built on flash or html5)

How To Use This Gem ?

Set on Gemfile

gem 'notification_server'

Generate configuration file

rails generate notification_server:config

This should generate "config/notification_server.yml"

Run Notification Server

rake notification_server:start

If you want to stop server

rake notification_server:stop

Restart server

rake notification_server:restart

Integrate notification server nowjs script

<%= javascript_include_notification_server %> # This will produce <script src='..../nowjs.js'.../>

Integrate asynchronously

<%= javascript_include_async_notification_server %>

Important: If you use this method remember you can't get "now" variable immediately you have to wait for "now" variable.

Example Usages

now.receive = function(info, message) { alert(message); }

now.register({name: 'hasan'})

now.publish('hi')

now.publish({data: {tilte: 'abc}})

  • nhm tanveer hossain khan (hasan)