recursecenter / webstack.jl

DEPRECATED: In progress Julia webstack
82 stars 5 forks source link

Micro dynamic routing #46

Closed despeset closed 11 years ago

despeset commented 11 years ago

Adds dynamic routes to Micro – supports the following:

get(app, "/regex/<test::%[0-9][0-9]-[a-z]*>") do req, res
    "Now you have 2 problems! test: $(route_params(req, :test))"
end

get(app, "/datatype/<test::Int>") do req, res
    "Int: $(route_params(req, :test))"
end

get(app, "/datatype/<test::Float>") do req, res
    "Float: $(route_params(req, :test))"
end

get(app, "/named/<test>") do req, res
    "Named: $(route_params(req, :test))"
end
despeset commented 11 years ago

Merged ed07a1abe3b917341411817d3642d71c5031c9de