Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5a2b52a215
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (23 sloc) 0.403 kb
use Bailador;
# simple cases
get '/' => sub {
"hello world"
};
get '/about' => sub {
"about me"
};
get '/hello/:name' => sub ($name) {
"Hello $name!"
};
# regexes, as usual
get /foo(.+)/ => sub ($x) {
"regexes! I got $x"
}
get / '/' (.+) '-' (.+)/ => sub ($x, $y) {
"$x and $y"
}
# junctions work too
get any('/h', '/help', '/halp') => sub {
"junctions are cool"
}
baile;
Jump to Line
Something went wrong with that request. Please try again.