NAME

MojoX::Dispatcher::Static - Static Dispatcher

SYNOPSIS

use MojoX::Dispatcher::Static;

my $dispatcher = MojoX::Dispatcher::Static->new;

DESCRIPTION

MojoX::Dispatcher::Static is a dispatcher for static files.

ATTRIBUTES

prefix

my $prefix  = $dispatcher->prefix;
$dispatcher = $dispatcher->prefix('/static');

types

my $types   = $dispatcher->types;
$dispatcher = $dispatcher->types(MojoX::Types->new);

root

my $root    = $dispatcher->root;
$dispatcher = $dispatcher->root('/foo/bar/files');

METHODS

MojoX::Dispatcher::Static inherits all methods from Mojo::Base and implements the follwing the ones.

dispatch

$dispatcher = $dispatcher->dispatch($tx);

server

$dispatcher = $dispatcher->serve($tx, '/foo/bar.html');