File Coverage

File:bin/yukki.psgi
Coverage:100.0%

linestmtbrancondsubpodtimecode
1#!/usr/bin/env plackup
2
1
1
14
8
use v5.24;
3
1
1
1
6
3
13
use utf8;
4
5
1
1
1
211
5746
15
use Plack::App::File;
6
1
1
1
402
1528
37
use Plack::Builder;
7
8
1
1
1
196
2
96
use Yukki::Web;
9
10my $server = Yukki::Web->new;
11my $app = sub {
12    my $env = shift;
13    return $server->dispatch($env);
14};
15
16builder {
17    mount "/style"    => Plack::App::File->new( root => $server->locate_dir('static_path', 'style') )->to_app;
18    mount "/script"   => Plack::App::File->new( root => $server->locate_dir('static_path', 'script') )->to_app;
19    mount "/template" => Plack::App::File->new( root => $server->locate_dir('static_path', 'template') )->to_app;
20
21    mount "/"       => builder {
22        enable $server->session_middleware;
23
24        $app;
25    };
26};
27
28# ABSTRACT: the Yukki web application
29# PODNAME: yukki.psgi
30
31 - 49
=head1 SYNOPSIS

  yukki.psgi

=head1 DESCRIPTION

If you have L<Plack> installed, you should be able to run this script from the
command line to start a simple test server. It is not recommend that you use
this web server in production.

See L<Yukki::Manual::Installation>.

=head1 ENVIRONMENT

Normally, this script tries to find F<etc/yukki.conf> from the current working
directory. If no configuraiton file is found, it checks C<YUKKI_CONFIG> for the
path to this file.

=cut