concrete
This commit is contained in:
41
bin/compiled.world.psgi
Normal file
41
bin/compiled.world.psgi
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use 5.036;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use FindBin;
|
||||
use Plack::Builder;
|
||||
use DBIx::Connector;
|
||||
use HTML::Composer;
|
||||
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
|
||||
use CW;
|
||||
use CW::Config;
|
||||
use CW::Router;
|
||||
|
||||
my $h = HTML::Composer->new();
|
||||
my $conf = CW::Config->new;
|
||||
my $db_conf = $conf->get('db');
|
||||
my $conn = DBIx::Connector->new(
|
||||
$db_conf->get('dsn'),
|
||||
$db_conf->get('username'),
|
||||
$db_conf->get('password')
|
||||
);
|
||||
|
||||
my $router = CW::Router->new();
|
||||
|
||||
$router->get('/')->action('Index#index');
|
||||
|
||||
builder {
|
||||
sub {
|
||||
CW->new(
|
||||
dbh => $conn->dbh,
|
||||
environment => $conf->get('environment'),
|
||||
h => $h,
|
||||
router => $router
|
||||
)->app->(@_);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user