require 'opal-sprockets' require 'opal-browser' require 'sinatra' opal = Opal::Sprockets::Server.new {|s| s.append_path 'app' s.main = 'application' s.debug = ENV['RACK_ENV'] != 'production' } map '/assets' do run opal.sprockets end get '/' do <<-HTML