Advertisement
Guest User

Untitled

a guest
Jun 9th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/usr/bin/env perl
  2. use Mojolicious::Lite;
  3. BEGIN{
  4. $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll';
  5. }
  6. # Documentation browser under "/perldoc"
  7. plugin 'PODRenderer';
  8.  
  9. get '/' => sub {
  10. my $self = shift;
  11. $self->render('index');
  12. };
  13.  
  14. app->start;
  15. __DATA__
  16.  
  17. @@ index.html.ep
  18. % layout 'default';
  19. % title 'Welcome';
  20. Welcome to the Mojolicious real-time web framework!
  21.  
  22. @@ layouts/default.html.ep
  23. <!DOCTYPE html>
  24. <html>
  25. <head><title><%= title %></title></head>
  26. <body><%= content %></body>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement