webgui/eg
2010-06-24 08:43:12 -07:00
..
apache.conf minor refactoring 2010-04-07 10:50:45 -04:00
dev.localhost.localdomain.cgi minor refactoring 2010-04-07 10:50:45 -04:00
dev.localhost.localdomain.fcgi Logging fallback 2010-04-13 17:46:43 -04:00
dev.localhost.localdomain.perlbal minor refactoring 2010-04-07 10:50:45 -04:00
README Add a missing newline. 2010-06-24 08:43:12 -07:00
urlmap.psgi Added URLMap support (e.g. virtual hosts and mounting) 2010-04-06 18:21:47 -04:00

# Some ways to achieve the same thing from the command line:
#  plackup -MWebGUI -e 'WebGUI->new'
#  plackup -MWebGUI -e 'WebGUI->new("dev.localhost.localdomain.conf")'
#  plackup -MWebGUI -e 'WebGUI->new(root => "/data/WebGUI", site => "dev.localhost.localdomain.conf")'
#
# Or from a .psgi file:
#  my $app = WebGUI->new( root => '/data/WebGUI', site => 'dev.localhost.localdomain.conf' )->psgi_app;


    
    # Extras
    my $extrasURL = $wg->config->get('extrasURL');
    my $extrasPath = $wg->config->get('extrasPath');
    enable 'Plack::Middleware::Static',
        path => sub { s{^$extrasURL/}{} },
        root => "$extrasPath/";
    
    # Uploads
    my $uploadsURL = $wg->config->get('uploadsURL');
    my $uploadsPath = $wg->config->get('uploadsPath');
    enable 'Plack::Middleware::Static',
        path => sub { s{^$uploadsURL/}{} }, 
        root => "$uploadsPath/";