Skip to content

yaonie084/talkplus-cramp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

talkplus

Talkplus is a project for startup weekend Taipei, it’s based https://github.com/lifo/cramp-pub-sub-chat-demo

API

for Host

The host’s uid is given when loading javascript.

Client request:

{ :action => “join”, :user => “ihower”, :channel => 123, :uid => “1234567890” } { :action => “message”, :message => ’xxxx, :uid => “1234567890” } { :action => “leave”, :uid => “1234567890” }

Server response:

{ :action => “block”, :uid => “1234567890” } { :action => “allow”, :uid => “1234567890” } { :action => “control”, :user => “foobar”, :message => ’xxxx }

for Guest

Client request:

{ :action => “join”, :user => “ihower”, :channel => 123 } { :action => “message”, :message => ’xxxx } { :action => “leave” }

Server response:

{ :action => “control”, :user => “foobar”, :message => ’xxxx } { :action => “assign”, :uid => “1234567890” } { :action => “block”, :uid => “1234567890” } { :action => “allow”, :uid => “1234567890” }

Cramp chat using Redis Pub/Sub + WebSockets

This is a proof-of-concept application to showcase Cramp’s integration with Redis Pub/Sub + WebSockets.

Running the application

Make sure you have Redis up and running.

$ bundle install
$ sudo RACK_ENV=production bundle exec thin —timeout 0 —port 80 start &

You should now see the application running at http://0.0.0.0:3000

Credits

This is an updated version of the Cramp application originally written by Pieter Noordhuishttps://gist.github.com/348262

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published