- enable 'Static', path => qr,/static/,;
- enable 'Log4perl', category => 'plack', conf => 'log.conf';
- enable_if \&some_auth_required, 'Auth::Basic', authenticator => sub { eval {pwcheck @_; 1} }, realm => 'Gruntmaster 6000';
- Plack::App::Gruntmaster->to_app
+ enable_if { $_[0]->{PATH_INFO} eq '/ok' } sub { sub{ [200, [], []] }};
+ enable 'AccessLog', format => ACCESSLOG_FORMAT, logger => sub { $access_logger->info(@_) };
+ enable 'ContentLength';
+ enable \&add_headers;
+ enable 'Static', path => qr,^/static/,;
+ enable 'Log4perl', category => 'plack';
+ enable \&add_database;
+ enable '+Plack::App::Gruntmaster::Auth',
+ dbi_connect => [$ENV{GRUNTMASTER_DSN} // 'dbi:Pg:', '', ''],
+ realm => 'Gruntmaster 6000',
+ mail_from => $ENV{GRUNTMASTER_RESET_FROM};
+ Plack::App::Gruntmaster->run_if_script