Skip to content

Commit

Permalink
add builder.psgi example
Browse files Browse the repository at this point in the history
  • Loading branch information
stash committed Nov 11, 2010
1 parent 1875a40 commit b8d6951
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions builder.psgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use warnings;
use strict;
use Plack::Builder;
use Plack::App::File;
my $proc_req = 0;
my $my_app = sub {
return [
200,['Content-Type'=>'text/html'],
['<html><head><title>ohai</title></head><body>o hai ',$proc_req++,'</body></html>']
];
};
builder {
enable "Debug", panels => [qw(Memory)];
mount "/static" => Plack::App::File->new(root=>'htdocs/');
mount "/favicon.ico" => sub { [200,[],['']] };
mount "/" => $my_app;
};

0 comments on commit b8d6951

Please sign in to comment.