Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Moblo;
- use Mojo::Base 'Mojolicious';
- use Mojolicious::Static;
- # This method will run once at server start
- sub startup {
- my $self = shift;
- # Documentation browser under "/perldoc"
- $self->plugin('PODRenderer');
- my $static = Mojolicious::Static->new;
- push @{$static->paths}, '/var/www/example.com/moblo/public';
- # Router
- my $r = $self->routes;
- # Normal route to controller
- $r->get('/')->to('login#index');
- }
- 1;
Add Comment
Please, Sign In to add comment