Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add example_faye/ and reference it in README

  • Loading branch information...
commit ccfed1205a6d9b5e6394432585891c38daf5a810 1 parent 1cb8cee
@jasonm jasonm authored
View
2  README.rdoc
@@ -7,7 +7,7 @@ system is Faye http://faye.jcoglan.com/.
This assumes you already have a Backbone.js + Rails app.
-1. Run a Faye server.
+1. Run a Faye server. It's pretty straightforward, check out `example_faye/run.sh` in this repo.
2. Tell your app where the faye server is. This may differ per Rails.env.
For now, let's say we add `config/initializers/backbone_sync_rails_faye.rb` with:
View
3  example_faye/Gemfile
@@ -0,0 +1,3 @@
+source 'http://rubygems.org'
+
+gem 'faye'
View
33 example_faye/Gemfile.lock
@@ -0,0 +1,33 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ addressable (2.2.6)
+ daemons (1.1.4)
+ em-hiredis (0.1.0)
+ hiredis (~> 0.3.0)
+ em-http-request (0.3.0)
+ addressable (>= 2.0.0)
+ escape_utils
+ eventmachine (>= 0.12.9)
+ escape_utils (0.2.3)
+ eventmachine (0.12.10)
+ faye (0.6.4)
+ em-hiredis (>= 0.0.1)
+ em-http-request (>= 0.2)
+ eventmachine (~> 0.12.0)
+ json (>= 1.0)
+ rack (>= 1.0)
+ thin (~> 1.2)
+ hiredis (0.3.2)
+ json (1.5.3)
+ rack (1.3.2)
+ thin (1.2.11)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ faye
View
4 example_faye/config.ru
@@ -0,0 +1,4 @@
+require 'faye'
+
+bayeux = Faye::RackAdapter.new(:mount => '/faye', :timeout => 25)
+bayeux.listen(9292)
View
3  example_faye/run.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+BASEDIR=$(dirname $0)
+BUNDLE_GEMFILE=$BASEDIR/Gemfile bundle exec rackup $BASEDIR/config.ru -s thin -E production
Please sign in to comment.
Something went wrong with that request. Please try again.