Giter Site home page Giter Site logo

talkplus-cramp's Introduction

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

talkplus-cramp's People

Contributors

ihower avatar lifo avatar

Stargazers

ethan wang avatar Ibragimov "MpaK" Renat avatar Mason Chang avatar Jeremy Hulick avatar  avatar  avatar

Watchers

 avatar hellolucky avatar Ibragimov "MpaK" Renat avatar  avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.