App-HTTPThis
view release on metacpan or search on metacpan
bin/http_this view on Meta::CPAN
Bind the server to a specific C<HOST> or IP address, such as
C<192.168.1.23> or C<::1>. By default the server binds to C<127.0.0.1>
(localhost), which is a breaking change in version C<1.0.0>. Use
C<--all> or C<--promiscuous> to restore the previous behaviour of listening
on all network interfaces.
=item --wsl
Bind the server to the non-loopback IPv4 address selected by the WSL
default network route. This is useful when running C<http_this> inside WSL and
opening the URL from a browser running on Windows. The command output will
show the selected WSL IP address to use in the Windows browser.
This is narrower than C<--all>, because it binds to one WSL address rather
than C<0.0.0.0>.
=item --all / --promiscuous
WARNING: this makes the server reachable on all network interfaces
(equivalent to C<--host 0.0.0.0>). Other machines on your network may be able
to access it. Use this only when you explicitly want the pre-1.0.0 behaviour
or need to share the server beyond the local machine.
=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<host>:
The host or IP address to bind to. If omitted, C<127.0.0.1> is used.
Set this to a specific address if you do not want the localhost default.
=item B<all>:
WARNING: if set to a true value, the server will bind to all network
interfaces (equivalent to C<host=0.0.0.0>), restoring the pre-1.0.0
behaviour.
=item B<wsl>:
If set to a true value, the server will bind to the non-loopback IPv4
address selected by the WSL default network route. This is useful when
running C<http_this> inside WSL and opening the URL from a browser running
on Windows.
=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 0.590 second using v1.01-cache-2.11-cpan-6aa56a78535 )