1Mojolicious::Command::dUaseemronC(o3n)tributed Perl DocuMmoejnotlaitciioonus::Command::daemon(3)
2
3
4

NAME

6       Mojolicious::Command::daemon - Daemon command
7

SYNOPSIS

9         Usage: APPLICATION daemon [OPTIONS]
10
11           ./myapp.pl daemon
12           ./myapp.pl daemon -m production -p -l http://*:8080
13           ./myapp.pl daemon -l http://127.0.0.1:8080 -l https://[::]:8081
14           ./myapp.pl daemon -l 'https://*:443?cert=./server.crt&key=./server.key'
15           ./myapp.pl daemon -l http+unix://%2Ftmp%2Fmyapp.sock
16           ./myapp.pl daemon -l http://127.0.0.1:8080 -p 127.0.0.0/8 -p fc00::/7
17
18         Options:
19           -b, --backlog <size>                 Listen backlog size, defaults to
20                                                SOMAXCONN
21           -c, --clients <number>               Maximum number of concurrent
22                                                connections, defaults to 1000
23           -h, --help                           Show this summary of available options
24               --home <path>                    Path to home directory of your
25                                                application, defaults to the value of
26                                                MOJO_HOME or auto-detection
27           -i, --inactivity-timeout <seconds>   Inactivity timeout, defaults to the
28                                                value of MOJO_INACTIVITY_TIMEOUT or 30
29           -k, --keep-alive-timeout <seconds>   Keep-alive timeout, defaults to the
30                                                value of MOJO_KEEP_ALIVE_TIMEOUT or 5
31           -l, --listen <location>              One or more locations you want to
32                                                listen on, defaults to the value of
33                                                MOJO_LISTEN or "http://*:3000"
34           -m, --mode <name>                    Operating mode for your application,
35                                                defaults to the value of
36                                                MOJO_MODE/PLACK_ENV or "development"
37           -p, --proxy [<network>]              Activate reverse proxy support,
38                                                defaults to the value of
39                                                MOJO_REVERSE_PROXY, optionally takes
40                                                one or more trusted proxy addresses or
41                                                networks
42           -r, --requests <number>              Maximum number of requests per
43                                                keep-alive connection, defaults to 100
44

DESCRIPTION

46       Mojolicious::Command::daemon starts applications with the
47       Mojo::Server::Daemon backend.
48
49       This is a core command, that means it is always enabled and its code a
50       good example for learning to build new commands, you're welcome to fork
51       it.
52
53       See "COMMANDS" in Mojolicious::Commands for a list of commands that are
54       available by default.
55

ATTRIBUTES

57       Mojolicious::Command::daemon inherits all attributes from
58       Mojolicious::Command and implements the following new ones.
59
60   description
61         my $description = $daemon->description;
62         $daemon         = $daemon->description('Foo');
63
64       Short description of this command, used for the command list.
65
66   usage
67         my $usage = $daemon->usage;
68         $daemon   = $daemon->usage('Foo');
69
70       Usage information for this command, used for the help screen.
71

METHODS

73       Mojolicious::Command::daemon inherits all methods from
74       Mojolicious::Command and implements the following new ones.
75
76   build_server
77         my $server = $daemon->build_server(@ARGV);
78
79       Build Mojo::Server::Daemon instance from command line arguments.
80
81   run
82         $daemon->run(@ARGV);
83
84       Run this command.
85

SEE ALSO

87       Mojolicious, Mojolicious::Guides, <https://mojolicious.org>.
88
89
90
91perl v5.34.0                      2021-07-22   Mojolicious::Command::daemon(3)
Impressum