Skip to content

Instantly share code, notes, and snippets.

@belison
Created August 13, 2012 19:15
Show Gist options
  • Save belison/3343400 to your computer and use it in GitHub Desktop.
Save belison/3343400 to your computer and use it in GitHub Desktop.
Figure 1 sample faye.ru
require ::File.expand_path('../config/environment', __FILE__)
require 'faye'
require 'yaml'
faye_config = YAML.load_file(Rails.root.join('config','faye.yml'))[Rails.env]
Faye::Logging.log_level = :debug
faye = Faye::RackAdapter.new(
:host => faye_config['host'],
:mount => "/#{faye_config['mount']}"
)
faye.listen(faye_config['port'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment