summaryrefslogtreecommitdiff
path: root/public/dispatch.cgi
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-06-13 16:27:11 +0200
committerfranck cuny <franck@lumberjaph.net>2011-06-13 16:27:11 +0200
commit98ec20127d450d4f8223a9a57fab9cbdb8e1dcb6 (patch)
treef6231cb4a433493d8bd912719b9b5943b5e0b3fc /public/dispatch.cgi
downloadstargit-98ec20127d450d4f8223a9a57fab9cbdb8e1dcb6.tar.gz
initial import
Diffstat (limited to 'public/dispatch.cgi')
-rwxr-xr-xpublic/dispatch.cgi15
1 files changed, 15 insertions, 0 deletions
diff --git a/public/dispatch.cgi b/public/dispatch.cgi
new file mode 100755
index 0000000..3bb7f2a
--- /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', 'app.pl');
+die "Unable to read startup script: $psgi" unless -r $psgi;
+
+Plack::Runner->run($psgi);