NAME

Mojolicious::Command::static - Quickly serve static files

SYNOPSIS

Usage: APPLICATION static [OPTIONS] dir1 dir2 ... file1 file2 ...

  ./myapp.pl static .
  ./myapp.pl static -d file2 -l http://*:8080 .

Options:
  -b, --backlog <size>                 Listen backlog size, defaults to
                                       SOMAXCONN
  -c, --clients <number>               Maximum number of concurrent
                                       connections, defaults to 1000
  -d, --default <file>                 Default file to respond with (like
                                       index.html). Defaults to directory
                                       index listing.
  -h, --help                           Show this summary of available options
      --home <path>                    Path to 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 15
  -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                          Activate reverse proxy support,
                                       defaults to the value of
                                       MOJO_REVERSE_PROXY
  -r, --requests <number>              Maximum number of requests per
                                       keep-alive connection, defaults to 100
                                       

DESCRIPTION

Mojolicious::Command::static quickly serves static files

Serves files from the current directory as well as those specified on the command line. If no default file is specified, a directory index will be built.

The maximum file size can be specified by the STATIC_MAXSIZE environment variable, or 10G by default.

ATTRIBUTES

Mojolicious::Command::static inherits all attributes from Mojolicious::Command and implements the following new ones.

description

my $description = $static->description;
$static         = $static->description('Foo');

Short description of this command, used for the command list.

usage

my $usage = $static->usage;
$routes   = $static->usage('Foo');

Usage information for this command, used for the help screen.

METHODS

Mojolicious::Command::static inherits all methods from Mojolicious::Command and implements the following new ones.

run

$static->run(@ARGV);

Run this command.

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicio.us.