webgui/app.psgi
Patrick Donelan 716bdaeb86 Added exception handling
Added error doc mapping
Moved more logic into Session middleware
Added Credit example to app.psgi
Made StackTrace and Debug panel automatically turn on when debug mode enabled
Fixed errorHandler
2010-04-10 22:52:40 -04:00

21 lines
636 B
Perl

use strict;
use Plack::Builder;
use lib '/data/WebGUI/lib';
use WebGUI;
my $root = '/data/WebGUI';
my $wg = WebGUI->new( root => $root, site => 'dev.localhost.localdomain.conf' );
builder {
enable 'Log4perl', category => 'mysite', conf => "$root/etc/log.conf";
enable 'Static', root => $root, path => sub { s{^/\*give-credit-where-credit-is-due\*$}{docs/credits.txt} };
# Open/close the WebGUI::Session at the outer-most onion layer
enable '+WebGUI::Middleware::Session',
config => $wg->config;#,
#error_docs => { 500 => "$root/www/maintenance.html" };
# Return the app
$wg;
};