Skip to content

Instantly share code, notes, and snippets.

@hesco
Last active February 7, 2018 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hesco/59bb7b6c79eff18ea3cc753575148f77 to your computer and use it in GitHub Desktop.
Save hesco/59bb7b6c79eff18ea3cc753575148f77 to your computer and use it in GitHub Desktop.
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