RSS Git Download  Clone
Raw Blame History
#!/usr/bin/env perl
BEGIN {
    $ENV{DANCER_APPHANDLER} = 'PSGI';
    $ENV{DANCER_ENVIRONMENT} = 'production';
}

use lib qw(
    /home/raj/perl-lib
    /home/raj/perl5/lib/perl5
    /home/raj/apps/CommsLog/lib
);
use Dancer2;
use FindBin '$RealBin';
use Plack::Runner;

# For some reason Apache SetEnv directives don't propagate
# correctly to the dispatchers, so forcing PSGI and env here
# is safer.
set apphandler => 'PSGI';
set environment => 'production'; # also doesn't work - set in BEGIN block

my $psgi = path($RealBin, '..', 'bin', 'app.psgi');
die "Unable to read startup script: $psgi" unless -r $psgi;

Plack::Runner->run($psgi);