Created
May 19, 2011 15:03
-
-
Save wose/980959 to your computer and use it in GitHub Desktop.
run otrs using Plack
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
use Plack::App::CGIBin; | |
use Plack::Builder; | |
use HTTP::Server::PSGI; | |
use Plack::App::File; | |
use lib "D:/otrs"; | |
use lib "D:/otrs/Kernel/cpan-lib"; | |
my $server = HTTP::Server::PSGI->new( | |
host => "127.0.0.1", | |
port => 9091, | |
timeout => 120, | |
); | |
my $static = Plack::App::File->new( | |
{ root => "otrs/var/httpd/htdocs" } | |
)->to_app; | |
my $cgi = Plack::App::CGIBin->new( | |
root => "otrs/bin/cgi-bin" | |
)->to_app; | |
my $app = builder { | |
mount "/cgi-bin" => $cgi; | |
mount "/otrs-web" => $static; | |
}; | |
$server->run($app); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment