Mojolic...:daemon(3)
π Mojolic...:daemon(3) β bestie edition π
okay so this is the manual page for Mojolic...:daemon(3), straight out of the User Contributed Perl Documentation collection. no cap, it's a whole vibe. let's get into it π¦
β¨ NAME β¨
Mojolicious::Command::daemon β the Daemon command. that's literally the whole name, she's lowkey humble about it π
πΈ SYNOPSIS πΈ
the way that you just run it like this:
Usage: APPLICATION daemon [OPTIONS]
and here's the group chat of example invocations, all iconic, all valid:
./myapp.pl daemon
./myapp.pl daemon -m production -p -l http://*:8080
./myapp.pl daemon -l http://127.0.0.1:8080 -l https://[::]:8081
./myapp.pl daemon -l 'https://*:443?cert=./server.crt&key=./server.key'
./myapp.pl daemon -l http+unix://%2Ftmp%2Fmyapp.sock
./myapp.pl daemon -l http://127.0.0.1:8080 -p 127.0.0.0/8 -p fc00::/7
π Options
every single one of them, no skipping, we don't gatekeep here π«Ά
-b,--backlog <size>β listen backlog size, defaults toSOMAXCONN-c,--clients <number>β maximum number of concurrent connections, defaults to1000-h,--helpβ show this summary of available options--home <path>β path to the home directory of your application, defaults to the value ofMOJO_HOMEor auto-detection-i,--inactivity-timeout <seconds>β inactivity timeout, defaults to the value ofMOJO_INACTIVITY_TIMEOUTor30-k,--keep-alive-timeout <seconds>β keep-alive timeout, defaults to the value ofMOJO_KEEP_ALIVE_TIMEOUTor5-l,--listen <location>β one or more locations you want to listen on, defaults to the value ofMOJO_LISTENor"http://*:3000"-m,--mode <name>β operating mode for your application, defaults to the value ofMOJO_MODE/PLACK_ENVor"development"-p,--proxy [<network>]β activate reverse proxy support, defaults to the value ofMOJO_REVERSE_PROXY, optionally takes one or more trusted proxy addresses or networks-r,--requests <number>β maximum number of requests per keep-alive connection, defaults to100
π¦ DESCRIPTION π¦
Mojolicious::Command::daemon starts applications with the Mojo::Server::Daemon backend. that's her whole job and she ate π
she's a core command, which means she is literally always enabled β main character energy, she doesn't need permission β¨
and plot twist: her code is a genuinely good example for learning to build new commands, so you're welcome to fork it. go off, build your own π§
if you want the full roster of commands that are available by default, peep "COMMANDS" in Mojolicious::Commands.
π ATTRIBUTES π
Mojolicious::Command::daemon inherits all attributes from Mojolicious::Command and implements the following new ones. she's got range π
description
my $description = $daemon->description;
$daemon = $daemon->description('Foo');
short description of this command, used for the command list. it's giving name tag at a party π
usage
my $usage = $daemon->usage;
$daemon = $daemon->usage('Foo');
usage information for this command, used for the help screen. this is the one that shows up when someone asks "how do i even" πΈ
π₯ METHODS π₯
Mojolicious::Command::daemon inherits all methods from Mojolicious::Command and implements the following new ones. periodt π
build_server
my $server = $daemon->build_server(@ARGV);
build Mojo::Server::Daemon instance from command line arguments. it's giving construction era ποΈβ¨
run
$daemon->run(@ARGV);
run this command. that's it, that's the whole method, she's efficient π
π SEE ALSO π
MojoliciousMojolicious::Guides- <https://mojolicious.org>
all three of them are linked at the top of the group chat, iykyk π
ngl those URLs are the moment, go click them, they're not gonna click themselves bestie π
sign-off time: this whole page comes to you courtesy of perl v5.42.0, dated 2026-07-15 β and it lives under the name Mojolic...:daemon(3) π byeee, go daemon responsibly β
π¦ where this page comes from
- opensuse-leap 16.0: perl-Mojolicious 9.480.0-bp160.2.1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms