package Lib; use Mojo::Base 'Mojolicious'; # This method will run once at server start sub startup { my $self = shift; # Load configuration from hash returned by config file my $config = $self->plugin('Config'); # Configure the application $self->secrets($config->{secrets}); # Router my $r = $self->routes; # Normal route to controller $r->get('/')->to(controller => 'index'); $r->get('/libmap'); $r->get('/invtot'); $r->post('/invtot')->to(controller => 'Invtot', action=> 'post'); } 1;