you missing the subroutine to define the route?!
from the docs you can get this:
use Mojolicious::Lite;
# Route leading to an action that renders a template
get '/with_layout' => sub {
my $self = shift;
$self->render('foo');
};
app->start;
__DATA__
@@ with_layout.html.ep
<!DOCTYPE html>
<html>
<head><title><%= title %></title></head>
<body><%= content %></body>
</html>
better is this:
get '/with_layout' => sub {
my $self = shift;
$self->render(template => 'with_layout', format => 'html', handler => 'ep');
return;
};
now the errors:
Template "not_found.development.html.ep" not found.
Template "not_found.html.ep" not found.
you can create these files in you templates directory
/lite_app.pl
/templates/not_found.development.html.ep
/templates/not_found.html.ep