register routes for a specific subdomain usage: Middleware.sub("a") do |r| r.get "/foo" { |env| "hi" } end