Created
February 20, 2018 21:29
-
-
Save Grinnz/dd283bfe6a477c278a2f73fe8196bc6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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⏎ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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