Created
December 8, 2010 03:02
-
-
Save fujiwara/732822 to your computer and use it in GitHub Desktop.
mt.psgi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use File::Basename; | |
use Plack::Builder; | |
use Plack::App::CGIBin; | |
my $basedir = dirname(__FILE__); | |
builder { | |
enable "Plack::Middleware::Static", | |
path => qr{^/mt-static/}, root => $basedir; | |
mount "/" => | |
Plack::App::CGIBin->new( root => $basedir, exec_cb => sub { 1 } )->to_app; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment