Merge branch 'slapbird'
This commit is contained in:
commit
e590fe26e5
1
cpanfile
1
cpanfile
|
@ -7,3 +7,4 @@ requires 'XML::RSS';
|
|||
requires 'Text::Markdown';
|
||||
requires 'HTML::Restrict';
|
||||
requires 'Roman::Unicode';
|
||||
requires 'SlapbirdAPM::Agent::Mojo';
|
||||
|
|
|
@ -19,6 +19,12 @@ sub startup($self) {
|
|||
$self->plugin('Config');
|
||||
$self->plugin('TagHelpers::Pagination');
|
||||
|
||||
# Alpha testing Slapbird APM
|
||||
if (my $slapbirdapm_api_key = $self->config->{'slapbirdapm_api_key'}) {
|
||||
$self->plugin('SlapbirdAPM', key => $slapbirdapm_api_key)
|
||||
if $self->mode eq 'production'
|
||||
}
|
||||
|
||||
# Helpers
|
||||
$self->helper(pg => sub ($c) {
|
||||
state $pg = Mojo::Pg->new($c->config->{$self->mode}{'pg_string'})
|
||||
|
|
Loading…
Reference in a new issue