Skip to content

Instantly share code, notes, and snippets.

@fujiwara
Created December 8, 2010 03:02
Show Gist options
  • Save fujiwara/732822 to your computer and use it in GitHub Desktop.
Save fujiwara/732822 to your computer and use it in GitHub Desktop.
mt.psgi
#!/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