Sha256: 55e1b35e5aa1bec4bc2539a64c77c76a021b492ba58986cc18d9b38ff714be6d
Contents?: true
Size: 634 Bytes
Versions: 1
Compression:
Stored size: 634 Bytes
Contents
helpers do def app_name "Multi-Screen Video Player" end def app_root "#{env['rack.url_scheme']}://#{env['HTTP_HOST']}#{env['SCRIPT_NAME']}" end end CometIO.on :connect do |session| puts "new client <#{session}>" end before '/*' do @title = app_name end get '/' do haml :index end get '/tv' do haml :tv end get '/remote' do haml :remote end get '/search.json' do content_type 'application/json' word = params[:word] begin YoutubeSearch.search(word).first.to_json rescue => e throw :halt, [500, 'Internal Server Error'] end end get '/:source.css' do scss params[:source].to_sym end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sinatra-multi-screen-0.0.1 | sample/main.rb |