Created
September 24, 2014 15:33
-
-
Save jontaylor/1ee3ef043fc34aea8017 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
package MyApp; | |
use Mojo::Base 'Mojolicious'; | |
# This method will run once at server start | |
sub startup { | |
my $self = shift; | |
# Documentation browser under "/perldoc" | |
$self->plugin('PODRenderer'); | |
# Router | |
my $r = $self->routes; | |
# Normal route to controller | |
$r->get('/')->to('example#welcome'); | |
} | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mojo generate app MyApp
cd my_app
hypnotoad script/my_app
ab -n20000 -c20 "http://127.0.0.1:8080/"
Stall occurs at 16000 requests processed