Sha256: 171d9afbd1683c3cf05a0db097385f66d6845e2a8ab6dcfeeb20f3cea682f81f
Contents?: true
Size: 492 Bytes
Versions: 16
Compression:
Stored size: 492 Bytes
Contents
require 'rack' use Rack::Static, root: '.', urls: %w( /index.html /profile.html /entries.html /entries.rss /favicon.png /entries /stylesheets /javascripts /images ) map '/' do run ->(env) { if env['PATH_INFO'] == '/' [ 200, {'Content-Type' => 'text/html', 'Cache-Control' => 'public, max-age=86400'}, File.open('index.html', File::RDONLY) ] else [404, {'Content-Type' => 'text/plain'}, ['Not Found']] end } end
Version data entries
16 entries across 16 versions & 1 rubygems