Debian Codegraph @

share/skel/default/public/+dispatch.fcgi

raw
1 [d2% perl_interpreter %2d]
2 BEGIN { $ENV{DANCER_APPHANDLER} = 'PSGI';}
3 use Dancer2;
4 use FindBin '$RealBin';
5 use Plack::Handler::FCGI;
6
7 # For some reason Apache SetEnv directives don't propagate
8 # correctly to the dispatchers, so forcing PSGI and env here
9 # is safer.
10 set apphandler => 'PSGI';
11 set environment => 'production';
12
13 my $psgi = path($RealBin, '..', 'bin', 'app.psgi');
14 my $app = do($psgi);
15 die "Unable to read startup script: $@" if $@;
16 my $server = Plack::Handler::FCGI->new(nproc => 5, detach => 1);
17
18 $server->run($app);