Last active
May 20, 2016 07:09
-
-
Save ryochin/bd39b9b12df849f100cd to your computer and use it in GitHub Desktop.
psgi file for MysqlTool (wip)
This file contains hidden or 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
# cpanm Plack CGI::Compile CGI::Emulate::PSGI | |
# vi htdocs/mysqltool.conf | |
# plackup ./mysqltool.psgi | |
use strict; | |
use warnings; | |
use lib qw(lib); | |
use CGI::Compile; | |
use CGI::Emulate::PSGI; | |
use Plack::Builder; | |
my $config = "./htdocs/mysqltool.conf"; | |
my $sub = CGI::Compile->compile("./htdocs/index.cgi"); | |
my $app = CGI::Emulate::PSGI->handler( sub { | |
require $config; | |
MysqlTool->handler; | |
} ); | |
builder { | |
enable 'Static', path => qr{^/(images)/}, root => "./htdocs"; | |
$app; | |
}; | |
__END__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment