NAME
Plack::App::XAO - XAO adapter for Plack
SYNOPSIS
In a psgi file with Builder:
builder {
mount '/' => Plack::App::XAO->new(site => 'example')->to_app(),
}
From a command line:
plackup -MPlack::App::XAO -e'Plack::App::XAO->new(site => 'example')->to_app()'
DESCRIPTION
Work in progress! Do not use in production code yet.
This is a simple adapter allowing to run a XAO::Web web site with Plack and the multitude of servers that support PSGI interface.
To serve static files either mount them with builder:
builder {
mount '/images' => Plack::App::File->new(root => '/path/to/images')->to_app;
mount '/' => Plack::App::XAO->new(site => 'example')->to_app(),
};
Or, better yet, just use the same 'maptodir' configuration that Apache::XAO module uses:
path_mapping_table => {
'/images' => {
type => 'maptodir',
},
},
That has a benefit of automatically prepending images with the site home directory path, whatever it happens to be.
EXPORTS
Nothing.
AUTHOR
Copyright (c) 2018 Andrew Maltsev
<am@ejelta.com> -- http://ejelta.com/xao/