More refactoring and documentation improvements
This commit is contained in:
parent
b7e7d5b936
commit
10e8d1898d
8 changed files with 140 additions and 47 deletions
23
eg/README
Normal file
23
eg/README
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# 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/";
|
||||
Loading…
Add table
Add a link
Reference in a new issue