add dxweb app
[spider.git] / dxweb / lib / DXWeb.pm
1 package DXWeb;
2 use Mojo::Base 'Mojolicious';
3
4 # This method will run once at server start
5 sub startup {
6   my $self = shift;
7
8   # Load configuration from hash returned by "my_app.conf"
9   my $config = $self->plugin('Config');
10
11   # Documentation browser under "/perldoc"
12   $self->plugin('PODRenderer') if $config->{perldoc};
13
14   # Router
15   my $r = $self->routes;
16
17   # Normal route to controller
18   $r->get('/')->to('example#welcome');
19 }
20
21 1;