Skip to content

Commit

Permalink
show an HTTP action in the README too
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 2, 2017
1 parent 18b20d9 commit 4ea8a83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ app->start;
use Mojolicious::Lite -signatures;

# Render template "index.html.ep" from the DATA section
get '/' => {template => 'index'};
get '/' => sub ($c) {
$c->render(template => 'index');
};

# WebSocket service used by the template to extract the title from a website
websocket '/title' => sub ($c) {
Expand Down

0 comments on commit 4ea8a83

Please sign in to comment.