Annotation of todotxt/Text-Todo/bin/dudelicious.pl, Revision 1.1
1.1 ! andrew 1: #!/usr/bin/env perl
! 2:
! 3: use Mojolicious::Lite;
! 4:
! 5: get '/' => 'index';
! 6:
! 7: get '/:groovy' => sub {
! 8: my $self = shift;
! 9: $self->render_text($self->param('groovy'), layout => 'funky');
! 10: };
! 11:
! 12: app->start;
! 13: __DATA__
! 14:
! 15: @@ index.html.ep
! 16: % layout 'funky';
! 17: Yea baby!
! 18:
! 19: @@ layouts/funky.html.ep
! 20: <!doctype html><html>
! 21: <head><title>Funky!</title></head>
! 22: <body><%== content %></body>
! 23: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>