Mojolicious::Command::static - Quickly serve static files
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
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.
Mojolicious::Command::static inherits all attributes from Mojolicious::Command and implements the following new ones.
my $description = $static->description; $static = $static->description('Foo');
Short description of this command, used for the command list.
my $usage = $static->usage; $routes = $static->usage('Foo');
Usage information for this command, used for the help screen.
Mojolicious::Command::static inherits all methods from Mojolicious::Command and implements the following new ones.
$static->run(@ARGV);
Run this command.
Mojolicious, Mojolicious::Guides, http://mojolicio.us.
To install Mojolicious::Command::static, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Command::static
CPAN shell
perl -MCPAN -e shell install Mojolicious::Command::static
For more information on module installation, please visit the detailed CPAN module installation guide.