X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=dxweb%2Flib%2FDXWeb.pm;fp=dxweb%2Flib%2FDXWeb.pm;h=68c5dcdb87d3149010d4e9003bc44b3a6721e900;hb=acf26488adcdf8852419818897405d10f895e16a;hp=0000000000000000000000000000000000000000;hpb=8fdda36498ce8c8b0feaf33d67f6582de5c2b03b;p=spider.git diff --git a/dxweb/lib/DXWeb.pm b/dxweb/lib/DXWeb.pm new file mode 100644 index 00000000..68c5dcdb --- /dev/null +++ b/dxweb/lib/DXWeb.pm @@ -0,0 +1,21 @@ +package DXWeb; +use Mojo::Base 'Mojolicious'; + +# This method will run once at server start +sub startup { + my $self = shift; + + # Load configuration from hash returned by "my_app.conf" + my $config = $self->plugin('Config'); + + # Documentation browser under "/perldoc" + $self->plugin('PODRenderer') if $config->{perldoc}; + + # Router + my $r = $self->routes; + + # Normal route to controller + $r->get('/')->to('example#welcome'); +} + +1;