Sha256: 9ee219927ced4db436871d2e3ebcd05cb4f53c4a54a46b6e4e86b5df764df3d2

Contents?: true

Size: 341 Bytes

Versions: 4

Compression:

Stored size: 341 Bytes

Contents

# rack app for static files
require "gitoe"
require "sinatra"

module Gitoe::HTTPServer
  class Static < ::Sinatra::Base

    set :app_file, __FILE__
    set :environment, :production
    set :static_cache_control, [:public, max_age: 3600]

    get "/" do
      send_file File.join( settings.public_folder, "index.html" )
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gitoe-0.1.3 lib/gitoe/httpserver/static.rb
gitoe-0.1.2 lib/gitoe/httpserver/static.rb
gitoe-0.1.1 lib/gitoe/httpserver/static.rb
gitoe-0.1.0 lib/gitoe/httpserver/static.rb