-
Is there a way to understand if the application is running under the development server (e.g., |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Often the best solution for this is to test |
Beta Was this translation helpful? Give feedback.
-
mojo will load config files based on the mode, so it makes sense to put your features behind a config flag and then turn them on in This also lets you turn on a features you planned to be dev-only in non-dev when they turn out to be handy for tracking down issues in prod. |
Beta Was this translation helpful? Give feedback.
-
I think you can use the $ perl -Mojo -E 'app->hook(before_server_start => sub ($server, $app) { say ref $server }); app->start' prefork
Mojo::Server::Prefork
Web application available at http://127.0.0.1:3000 |
Beta Was this translation helpful? Give feedback.
mojo will load config files based on the mode, so it makes sense to put your features behind a config flag and then turn them on in
$appname.development.conf
.This also lets you turn on a features you planned to be dev-only in non-dev when they turn out to be handy for tracking down issues in prod.