Dezi::MultiTenant - multiple Dezi::Server applications in a single instance


 % dezi --server-class Dezi::MultiTenant --dezi-config
 # 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 );
 # /foo mounts a Dezi::Server
 # /bar mounts a Dezi::Server


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.


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.


Peter Karman, <karman at>


Please report any bugs or feature requests to bug-dezi-multitenant at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc Dezi::MultiTenant

You can also look for information at:


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 for more information.