Last active
February 7, 2018 20:26
-
-
Save hesco/59bb7b6c79eff18ea3cc753575148f77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package MyAPI; | |
use FindBin; | |
use lib "$FindBin::Bin/../lib", "$FindBin::Bin/../local/lib/perl5"; | |
use Mojo::Base 'Mojolicious'; | |
use Moose; | |
use MooseX::NonMoose; | |
with 'MyAPI::Roles::Config', 'My::Roles::DB', 'MyAPI::Roles::AUP'; | |
use Log::Log4perl; | |
use MyAPI::Controller::UserSessions; | |
our $VERSION = '0.18.1'; | |
# This method will run once at server start | |
sub startup { | |
my $self = shift; | |
# <snip> | |
# Log::Log4perl | |
Log::Log4perl->init($self->home->child('conf.d/gagp_api.log4perl.conf')); | |
$self->plugin('Log::Any' => {logger => 'Log::Log4perl'}); | |
# Router | |
my $r = $self->routes; | |
# <snip> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment