24 lines
510 B
Perl
24 lines
510 B
Perl
package MojoApp;
|
|
use Mojo::Base 'Mojolicious', -signatures;
|
|
|
|
# This method will run once at server start
|
|
sub startup ($self) {
|
|
|
|
# Load configuration from config file
|
|
my $config = $self->plugin('NotYAMLConfig');
|
|
|
|
# Configure the application
|
|
$self->secrets($config->{secrets});
|
|
|
|
$self->plugin(AssetPack => {pipes => [qw(Css)]});
|
|
$self->asset->process("app.css" => ("materialize.css"));
|
|
|
|
# Router
|
|
my $r = $self->routes;
|
|
|
|
# Normal route to controller
|
|
$r->get('/')->to('Example#welcome');
|
|
}
|
|
|
|
1;
|