require 'bundler/setup' require 'sinatra' def send_kryo_file path file = File.join(File.dirname(__FILE__), 'public', path) file = File.join(file, 'index.html') unless file =~ /\.[a-z]+$/i send_file(file) end get(/.+/) do send_kryo_file(request.path) end not_found do send_file('404.html') end