25 lines
748 B
Perl
25 lines
748 B
Perl
package BeastBB;
|
|
|
|
use Mojo::Base 'Mojolicious';
|
|
use Mojo::File;
|
|
use Data::Dumper;
|
|
|
|
sub startup {
|
|
my $self = shift;
|
|
my $config = $self->plugin(
|
|
'Config',
|
|
file => Mojo::File::curfile->dirname->child('BeastBB.conf')->to_string
|
|
);
|
|
$self->secrets( $config->{secrets} );
|
|
my $r = $self->routes;
|
|
$r->get('/')->to('example#welcome');
|
|
@{ $self->renderer->paths() } =
|
|
( Mojo::File::curfile->dirname->child('BeastBB')->child('templates')->to_string );
|
|
@{ $self->static->paths() } =
|
|
( Mojo::File::curfile->dirname->child('BeastBB')->child('public')->to_string );
|
|
STDERR->print(Data::Dumper::Dumper $self->static->paths());
|
|
STDERR->print(Data::Dumper::Dumper $self->renderer->paths());
|
|
}
|
|
|
|
1;
|