NAME
MVC::Neaf::X::Files - serve static content for Not Even A Framework.
SYNOPSIS
use MVC::Neaf;
MVC::Neaf->static( "/path/in/url" => "/local/path", %options );
These options would go to this module's new() method described below.
DESCRIPTION
Serving static content in production via a perl application framework is a bad idea. However, forcing the user to run a separate web-server just to test their CSS, JS, and images is an even worse one.
So this module is here to fill the gap.
METHODS
new( %options )
%options may include:
buffer - buffer size for serving files.
cache_ttl - if given, files below the buffer size will be stored in memory for cache_ttl seconds. EXPERIMENTAL. Cache API is not yet established.
make_handler
Returns a Neaf-compatible hander sub.