diff options
| author | franck cuny <franck@lumberjaph.net> | 2011-06-13 16:27:11 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2011-06-13 16:27:11 +0200 |
| commit | 98ec20127d450d4f8223a9a57fab9cbdb8e1dcb6 (patch) | |
| tree | f6231cb4a433493d8bd912719b9b5943b5e0b3fc /public/dispatch.fcgi | |
| download | stargit-98ec20127d450d4f8223a9a57fab9cbdb8e1dcb6.tar.gz | |
initial import
Diffstat (limited to 'public/dispatch.fcgi')
| -rwxr-xr-x | public/dispatch.fcgi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/public/dispatch.fcgi b/public/dispatch.fcgi new file mode 100755 index 0000000..8c42e3a --- /dev/null +++ b/public/dispatch.fcgi @@ -0,0 +1,17 @@ +#!/usr/bin/env perl +use Dancer ':syntax'; +use FindBin '$RealBin'; +use Plack::Handler::FCGI; + +# For some reason Apache SetEnv directives dont propagate +# correctly to the dispatchers, so forcing PSGI and env here +# is safer. +set apphandler => 'PSGI'; +set environment => 'production'; + +my $psgi = path($RealBin, '..', 'bin', 'app.pl'); +my $app = do($psgi); +die "Unable to read startup script: $@" if $@; +my $server = Plack::Handler::FCGI->new(nproc => 5, detach => 1); + +$server->run($app); |
