Skip to content

Instantly share code, notes, and snippets.

@Grinnz
Created February 20, 2018 21:29
Show Gist options
  • Save Grinnz/dd283bfe6a477c278a2f73fe8196bc6f to your computer and use it in GitHub Desktop.
Save Grinnz/dd283bfe6a477c278a2f73fe8196bc6f to your computer and use it in GitHub Desktop.
> mojo get 'http://localhost:3000//fred/fish'
[Tue Feb 20 16:28:38 2018] [debug] GET "/fish"
[Tue Feb 20 16:28:38 2018] [debug] Routing to a callback
[Tue Feb 20 16:28:38 2018] [debug] 200 OK (0.000438s, 2283.105/s)
fred⏎
use Mojolicious::Lite;
get '/*whatever' => sub {
my $c = shift;
$c->render(text => $c->req->url->host);
};
app->start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment