NAME

Scaffold::Server - The Scaffold web engine

SYNOPSIS

app.psgi
--------

use lib 'lib';
use Scaffold::Server;

my $psgi_handler;

main: {

   my $server = Scaffold::Server->new(
       locations => [
           }
               route   => qr{^/robots.txt$},
               handler => 'Scaffold::Handler::Robots',
           },{
               route   => qr{^/favicon.ico$},
               handler => 'Scaffold::Handler::Favicon',
           },{
               route   => qr{^/login/(.*)$},
               handler => 'Scaffold::Uaf::Login',
           },{
               route   => qr{^/logout$},
               handler => 'Scaffold::Uaf::Logout',
           },{
               route   => qr{^/(.*)$},
               handler => 'Scaffold::Handler::Static',
           }
       ],
       authorization => {
           authenticate => 'Scaffold::Uaf::Manager',
           authorize    => 'Scaffold::Uaf::AuthorizeFactory',
       }
   );

   $psgi_hander = $server->engine->psgi_handler();

}

Initializes and returns a handle for the psgi engine. Suitable for this command:

# plackup -app app.psgi -s Standalone::Prefork

Which is a great way to develop and test your web application. By the way, the above configuration would run a complete static page site that needs authentication for access.

DESCRIPTION

This module is the main entry point for an application built with Scaffold. It parses the configuration, loads the various components, makes the various connections for the CacheManager, the LockManager, initializes the SessionManager and store the connect to the database of your choice.

METHODS

dispatch

This method parses the URL and dispatches to the appropiate handler for request handling.

SEE ALSO

Scaffold
Scaffold::Base
Scaffold::Cache
Scaffold::Cache::FastMmap
Scaffold::Cache::Manager
Scaffold::Cache::Memcached
Scaffold::Class
Scaffold::Constants
Scaffold::Engine
Scaffold::Handler
Scaffold::Handler::Default
Scaffold::Handler::Favicon
Scaffold::Handler::Robots
Scaffold::Handler::Static
Scaffold::Lockmgr
Scaffold::Lockmgr::KeyedMutex
Scaffold::Lockmgr::UnixMutex
Scaffold::Plugins
Scaffold::Render
Scaffold::Render::Default
Scaffold::Render::TT
Scaffold::Server
Scaffold::Session::Manager
Scaffold::Stash
Scaffold::Stash::Controller
Scaffold::Stash::Cookie
Scaffold::Stash::View
Scaffold::Uaf::Authenticate
Scaffold::Uaf::AuthorizeFactory
Scaffold::Uaf::Authorize
Scaffold::Uaf::GrantAllRule
Scaffold::Uaf::Login
Scaffold::Uaf::Logout
Scaffold::Uaf::Manager
Scaffold::Uaf::Rule
Scaffold::Uaf::User
Scaffold::Utils

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Kevin L. Esteb

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.