From: Jason Stephenson Date: Fri, 27 Jun 2014 22:18:08 +0000 (-0400) Subject: Add public/dispatch.cgi for use with Apache and Plack. X-Git-Url: https://git.evergreen-ils.org/?p=working%2FNCIPServer.git;a=commitdiff_plain;h=5961c09a5181b2e787c3ea0fee67eac4a1992a99 Add public/dispatch.cgi for use with Apache and Plack. Signed-off-by: Jason Stephenson --- diff --git a/public/dispatch.cgi b/public/dispatch.cgi new file mode 100755 index 0000000..d04253c --- /dev/null +++ b/public/dispatch.cgi @@ -0,0 +1,15 @@ +#!/usr/bin/env perl +use Dancer ':syntax'; +use FindBin '$RealBin'; +use Plack::Runner; + +# 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', 'ncip_dancing.pl'); +die "Unable to read startup script: $psgi" unless -r $psgi; + +Plack::Runner->run($psgi);