Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (19 sloc) 437 Bytes
require 'sinatra'
require 'RedCloth'
class Styrdokument < Sinatra::Base
set :textile, layout_engine: :erb
get "/" do
erb :index, locals: {page: ""}
end
get /^\/(stadgar|reglemente)$/ do |document|
erb :document, locals: {page: document}
end
post "/update" do
`/bin/sh update_styrdokument.sh`
status 200
body ""
end
get /\/(.*(?:js|css|pdf))/ do |asset|
send_file "public/#{asset}"
end
end
Something went wrong with that request. Please try again.