App-HTTPThis

 view release on metacpan or  search on metacpan

bin/http_this  view on Meta::CPAN


A simple web server is started and is kept running until you kill it
with C<Ctrl-C>.

All the files and directories will be availble to a browser under the
URL the script outputs.


=head1 ARGUMENTS

The script accepts a single optional argument: the path of the directory
to export.


=head1 OPTIONS

The following options are available:

=over 4

=item --port PORT

Start the HTTP server on a specific C<PORT>.

=item --name NAME

Announces the server over Bonjour.

This feature requires the L<Net::Rendezvous::Publish> module and the
appropriate backend for your operating system, both available from
L<MetaCPAN|https://metacpan.org/>. If one of them cannot be found, a
warning message will be displayed.

=item --autoindex

By default, if the server gets a request that ends in / then it displays
a listing of that directory. With the C<--autoindex> flag, it will serve
the C<index.html> file from that directory (if it exists).

=item --pretty

Creates default index listings using a prettier cascading stylesheet.

=item --config FILE

Read configuration options from C<FILE>. See L<CONFIGURATION FILE> below.

=item --help

Print information about the script usage and its options.

=item --man

Print the entire man page for the command.

=back

=head2 CONFIGURATION FILE

The script can read configuration options from a file. By default, it
looks for a file named C<.http_thisrc> in the current directory or
your home directory. You can specify a different file with the C<--config>
option or by setting the C<HTTP_THIS_CONFIG> environment variable.

The config file consists of lines in the format C<key=value>. The valid
keys are:

=over 4

=item B<port>:

The port to use for the HTTP server.

=item B<name>:

The name to use when announcing the server over Bonjour.

=item B<autoindex>:

If set to a true value, the server will serve the C<index.html> file from
a directory when it gets a request that ends in / (instead of displaying
a listing of that directory).

=item B<pretty>:

If set to a true value, the server will use a prettier cascading stylesheet
for directory listings.

=back



( run in 1.286 second using v1.01-cache-2.11-cpan-39bf76dae61 )