NAME

mccs - Fully-featured static file server.

SYNOPSIS

$ mccs [OPTS] [DIR]

# serve current working directory over HTTP, port 5000
$ mccs

# serve a directory on port 80 using Starman
$ mccs -s Starman --listen :80 /some/directory

DESCRIPTION

mccs is an HTTP static file server that can be used as a standalone application, or as a Plack component.

FEATURES

mccs aims for reducing CPU load by retaining minified and compressed representations of files until they are no longer valid. It does not recompress on every request.

For information on how to use mccs as a library or embedded in Plack applications, see Plack::App::MCCS and Plack::Middleware::MCCS.

ARGUMENTS

DIR

The directory to serve files from. Defaults to the current working
directory.

OPTIONS

Note that mccs is an extension of plackup, and accepts all the flags and options supported by it, but not all make sense in the context of mccs usage. It is recommended to use an HTTP server such as Twiggy or Starman in a production setting. Other options that starts with "--" are passed through to the backend server. See each Plack::Handler backend's documentation for more details on their available options.

HOW DOES IT WORK?

When a request is accepted by the server, the following process is initiated:

CAVEATS AND THINGS TO CONSIDER

DIAGNOSTICS

mccs doesn't directly throw any exceptions, instead returning HTTP errors to the client and possibly issuing some warns. The following list should help you to determine some potential problems with MCCS:

CONFIGURATION AND ENVIRONMENT

mccs requires no configuration files or environment variables.

REQUIREMENTS

mccs requires the following dependencies:

mccs will use the following CPAN modules if they exist:

The following CPAN modules are also recommended:

INCOMPATIBILITIES WITH OTHER MODULES

None reported.

BUGS AND LIMITATIONS

Please report any bugs or feature requests to bug-Plack-App-MCCS@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Plack-App-MCCS.

SEE ALSO

Plack::App::MCCS, Plack::Middleware::MCCS, Plack::Runner, plackup.

AUTHOR

Ido Perlmuter ido@ido50.net

ACKNOWLEDGMENTS

Some of this application's code is based on Plack::App::File by Tatsuhiko Miyagawa and Plack::Middleware::ETag by Franck Cuny.

Christian Walde contributed new features and fixes for the 1.0.0 release.

LICENSE AND COPYRIGHT

Copyright (c) 2011-2023, Ido Perlmuter ido@ido50.net.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.