Skip to content

TOEOS/Apollo-radio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apollo-radio

The websocket server for Armstrong

Prerequirememnt

  • Redis
  • Ruby 1.9+

Setup

  • Install Gem
bundle install
  • Start both websocket server and API server
rake apollo:start
  • or just start websocket server
rake apollo:ws_server
  • just start api server
rake apollo:api_server

Test in Front-End

open developmemnt tool and type javascript

  • connect with websocket server
init_channel('apollo');
  • send message
var data_hash = {channel: 'apollo', msg: 'call armstrong'};
ws.send(JSON.stringify(data_hash));

Push message end-point

  • Specify channel with parameter.
  • Put data(JSON format) in body will send to client.

here is example:

  • POST request
http://localhost:4567/armstrong_push?channel=apollo
  • data in the body
{
    "data": {
        "msg": "rock and roll"
    }
}

About

🚀 The websocket server for Armstrong

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published