#!/usr/bin/env perl
use
Mojolicious::Lite;
# Documentation browser under "/perldoc"
plugin
'PODRenderer'
;
plugin
'GoogleAnalytics'
;
get
'/'
=>
sub
{
my
$self
=
shift
;
$self
->render(
'index'
);
};
app->start;
__DATA__
@@ index.html.ep
% layout 'default';
% title 'Welcome';
Welcome to the Mojolicious real-time web framework!
@@ layouts/default.html.ep
<!DOCTYPE html>
<html>
<head><title><%= title %></title></head>
<body><%= content %>
<%= analytics 'UA-23169268-1' %>
</body>
</html>