Last active
December 15, 2015 16:49
-
-
Save digitalextremist/5292312 to your computer and use it in GitHub Desktop.
Rack routing. Updated to show wildcarding.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map "/.conference" do; run Mu::Conference end | |
map "/.documentation" do; run Mu::Documentation end | |
map "/.development" do; run Mu::Development end | |
map "/.sources" do; run Mu::Sourcing end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mu | |
class Development < Ma #de pulls in Sinatra::Base and performs global configurations that apply to all requests. | |
register Sinatra::MultiRoute | |
before do; Mu.protected! end | |
get '/', '/news' do | |
... | |
end | |
get '/repositories', '/code' do | |
... | |
end | |
get "/*" do | |
#de ... not found, return error 404 | |
404 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I didn't catch you comment here until now @seancribbs. Thanks for following up on this!