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 to SOMAXCONN
  • -c, --clients <number> β€” maximum number of concurrent connections, defaults to 1000
  • -h, --help β€” show this summary of available options
  • --home <path> β€” path to the home directory of your application, defaults to the value of MOJO_HOME or auto-detection
  • -i, --inactivity-timeout <seconds> β€” inactivity timeout, defaults to the value of MOJO_INACTIVITY_TIMEOUT or 30
  • -k, --keep-alive-timeout <seconds> β€” keep-alive timeout, defaults to the value of MOJO_KEEP_ALIVE_TIMEOUT or 5
  • -l, --listen <location> β€” one or more locations you want to listen on, defaults to the value of MOJO_LISTEN or "http://*:3000"
  • -m, --mode <name> β€” operating mode for your application, defaults to the value of MOJO_MODE/PLACK_ENV or "development"
  • -p, --proxy [<network>] β€” activate reverse proxy support, defaults to the value of MOJO_REVERSE_PROXY, optionally takes one or more trusted proxy addresses or networks
  • -r, --requests <number> β€” maximum number of requests per keep-alive connection, defaults to 100

πŸ¦‹ 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 🌈

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