--- /dev/null
+{
+ perldoc => 1,
+ secrets => ['ac82f00b5490aa599f88feafe6b3af4014aefb5a']
+}
--- /dev/null
+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;
--- /dev/null
+package DXWeb::Controller::Example;
+use Mojo::Base 'Mojolicious::Controller';
+
+# This action will render a template
+sub welcome {
+ my $self = shift;
+
+ # Render template "example/welcome.html.ep" with message
+ $self->render(msg => 'Welcome to the Mojolicious real-time web framework!');
+}
+
+1;
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Welcome to the Mojolicious real-time web framework!</title>
+ </head>
+ <body>
+ <h2>Welcome to the Mojolicious real-time web framework!</h2>
+ This is the static document "public/index.html",
+ <a href="/">click here</a> to get back to the start.
+ </body>
+</html>
--- /dev/null
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use FindBin;
+BEGIN { unshift @INC, "$FindBin::Bin/../lib" }
+use Mojolicious::Commands;
+
+# Start command line interface for application
+Mojolicious::Commands->start_app('DXWeb');
--- /dev/null
+use Mojo::Base -strict;
+
+use Test::More;
+use Test::Mojo;
+
+my $t = Test::Mojo->new('DXWeb');
+$t->get_ok('/')->status_is(200)->content_like(qr/Mojolicious/i);
+
+done_testing();
--- /dev/null
+% layout 'default';
+% title 'Welcome';
+<h2><%= $msg %></h2>
+<p>
+ This page was generated from the template "templates/example/welcome.html.ep"
+ and the layout "templates/layouts/default.html.ep",
+ <%= link_to 'click here' => url_for %> to reload the page or
+ <%= link_to 'here' => '/index.html' %> to move forward to a static page.
+ % if (config 'perldoc') {
+ To learn more, you can also browse through the documentation
+ <%= link_to 'here' => '/perldoc' %>.
+ % }
+</p>
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head><title><%= title %></title></head>
+ <body><%= content %></body>
+</html>