miyagawa (owner)

Revisions

gist: 206782 Download_button fork
public
Public Clone URL: git://gist.github.com/206782.git
Embed All Files: show embed
hello-file.psgi #
1
2
3
4
5
6
7
8
9
10
11
use strict;
use Plack::Builder;
use File::Basename qw(dirname);
use Cwd qw(abs_path);
use Plack::App::File;
 
builder {
    dispatch "/" => sub { return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ] };
    dispatch "/static" => Plack::App::File->new({ root => dirname(__FILE__) });
};