miyagawa (owner)

Revisions

gist: 206778 Download_button fork
public
Public Clone URL: git://gist.github.com/206778.git
Embed All Files: show embed
hello-static.psgi #
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use Plack::Builder;
use File::Basename qw(dirname);
use Cwd qw(abs_path);
 
builder {
    add "Plack::Middleware::Static",
        path => sub { s!^/static/!! }, root => dirname(__FILE__);
    sub {
        return [ 200, [ "Content-Type" => "text/plain", "Content-Length" => 11 ], [ "Hello World" ] ];
    };
};