Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (27 sloc) 1.05 KB
#!/usr/bin/env ruby
# Try to load vendor-ed rhosync, otherwise load the gem
require 'vendor/rhosync/lib/rhosync/server'
require 'vendor/rhosync/lib/rhosync/console/server'
rescue LoadError
require 'rhosync/server'
require 'rhosync/console/server'
# By default, turn on the resque web console
require 'resque/server'
ROOT_PATH = File.expand_path(File.dirname(__FILE__))
# Rhosync server flags
Rhosync::Server.disable :run
Rhosync::Server.disable :clean_trace
Rhosync::Server.enable :raise_errors
Rhosync::Server.set :environment, :development
Rhosync::Server.set :secret, '<changeme>'
Rhosync::Server.set :root, ROOT_PATH
Rhosync::Server.use Rack::Static, :urls => ["/data"], :root => Rhosync::Server.root
# Load our rhosync application
require 'application'
# Setup the url map
run \
"/" =>,
"/resque" =>, # If you don't want resque frontend, disable it here
"/console" => # If you don't want rhosync frontend, disable it here