Last active
November 15, 2018 22:19
-
-
Save diegok/da761675af83cbc0df82656b0ade8247 to your computer and use it in GitHub Desktop.
before_server_start is never trigger
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 -signatures; | |
get '/' => sub($c) { | |
$c->render( text => $c->req->url->to_abs->port ) | |
}; | |
# Does not work | |
hook before_server_start => sub($server, $app) { | |
app->log->debug('before_server_start'); | |
}; | |
# Works | |
hook before_dispatch => sub($c) { | |
app->log->debug('before_dispatch'); | |
}; | |
app->start; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment