NAME
Dezi::MultiTenant - multiple Dezi::Server applications in a single instance
SYNOPSIS
% dezi --server-class Dezi::MultiTenant --dezi-config myconfig.pl
# or in your own Plack app
use Plack::Runner;
use Dezi::MultiTenant;
my $multitenant_config = {
'foo' => Dezi::Config->new(\%foo_opts),
'bar' => Dezi::Config->new(\%bar_opts),
};
my $runner = Plack::Runner->new();
my $app = Dezi::MultiTenant->app( $multitenant_config );
$runner->run($app);
# /foo mounts a Dezi::Server
# /bar mounts a Dezi::Server
DESCRIPTION
Dezi::MultiTenant provides a simple way to mount multiple Dezi::Server applications in a single Plack app using a single configuration structure.
Dezi::Server allows you to serve multiple indexes, but all the indexes must have identical schemas.
Dezi::MultiTenant allows you to server multiple indexes per server, and each server can have a different schema, as well as individual administration, logging, unique configuration, etc.
METHODS
app( config )
Returns Plack $app instance via Plack::Builder.
config should either be a hashref with keys representing each Dezi::Server's mount point, or a Dezi::MultiTenant::Config object. By default the root '/' mount point is reserved for the Dezi::MultiTenant->about() method response. Hash keys should have the '/' prefix (same syntax as Plack::App::URLMap).
about( plack_request, loaded )
Returns Plack::Response-like array ref describing the multi-tenant application.
AUTHOR
Peter Karman, <karman at cpan.org>
BUGS
Please report any bugs or feature requests to bug-dezi-multitenant at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dezi-MultiTenant. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Dezi::MultiTenant
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
COPYRIGHT & LICENSE
Copyright 2013 Peter Karman.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.