Git Product home page Git Product logo

codeaholics_chat_room's Introduction

Codeaholics Chatroom

  • This is a demo application (for Codeaholics HK meetup) to show how to build up a chat room with security considered.

  • It is written in Ruby On Rails with Web Socket communication.

  • Web Socket communication channel can be secured by using HTTPS.

Steps to run this application on your machine

  1. get your ruby on rails environment setup. I am using Ruby 1.9.3 and Rails 3.2.

  2. download the project

git clone [email protected]:3dd13/codeaholics_chat_room.git
  1. go into the project folder

cd codeaholics_chat_room
  1. install all the dependencies

bundle install
  1. prepare the MySQL database

cp database.yml.sample database.yml 
update database.yml with your mysql login password
rake db:create
rake db:migate
  1. start the Rails application

rails s
  1. open another terminal, start the Faye service

rackup private_pub.ru -s thin -E production

Dependency projects

Run Faye on heroku

basically it is relying on the Procfile to instruct heroku how to start the faye service. Check out the Procfile usage on heroku documentation if you are interested.

Warning ! Do not just use this one version for production use

there are few things you have to do before deploying to production, in order to make sure it is secure. For example,

  • you have to change the token in private_pub.yml

  • you have to setup HTTPS for the publish and subscribe channel

  • you have to change the rails session store key

codeaholics_chat_room's People

Contributors

3dd13 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.