SHARE
TWEET

Untitled

a guest Jul 29th, 2016 27 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Moblo;
  2. use Mojo::Base 'Mojolicious';
  3. use Mojolicious::Static;
  4.  
  5. # This method will run once at server start
  6. sub startup {
  7.   my $self = shift;
  8.  
  9.   # Documentation browser under "/perldoc"
  10.   $self->plugin('PODRenderer');
  11.   my $static = Mojolicious::Static->new;
  12.   push @{$static->paths}, '/var/www/example.com/moblo/public';
  13.   # Router
  14.   my $r = $self->routes;
  15.  
  16.   # Normal route to controller
  17.   $r->get('/')->to('login#index');
  18. }
  19.  
  20. 1;
RAW Paste Data
Top