Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (18 sloc) 0.502 kB
require 'rack/offline'
require './server'
map '/' do
run Sinatra::Application
end
map '/application.manifest' do
offline = Rack::Offline.new :cache => true, :root => "public" do
["javascripts/*", "stylesheets/**/*", "images/*", "app/**/*"].each do |folder|
Dir[File.join(settings.public_folder, folder)].each do |file|
if File.file?(file)
cache file.sub(File.join(settings.public_folder, ""), "")
end
end
end
network '/'
end
run offline
end
Jump to Line
Something went wrong with that request. Please try again.