http_this - export the current directory over HTTP
version 0.009
## Export the current directory with HTTP $ http_this ## Export the dir_name directory with HTTP $ http_this dir_name ## Start the server on a specific port $ http_this --port 9001 ## Announces the HTTP server via Bonjour with the specified name $ http_this --name "My cool webserver" ## Start the server using index.html for directory requests $ http_this --autoindex ## Start the server using prettier CSS for index pages $ http_this --pretty ## Load config from a file $ http_this --config /path/to/configrc ## Show documentation about our options $ http_this --help ## Show the entire man page $ http_this --man
The http_this command exports the current directory via HTTP. You can also export any directory by providing the path as a parameter.
http_this
A simple web server is started and is kept running until you kill it with Ctrl-C.
Ctrl-C
All the files and directories will be availble to a browser under the URL the script outputs.
The script accepts a single optional argument: the path of the directory to export.
The following options are available:
Start the HTTP server on a specific PORT.
PORT
Announces the server over Bonjour.
This feature requires the Net::Rendezvous::Publish module and the appropriate backend for your operating system, both available from CPAN. If one of them cannot be found, a warning message will be displayed.
By default, if the server gets a request that ends in / then it displays a listing of that directory. With the --autoindex flag, it will serve the index.html file from that directory (if it exists).
--autoindex
index.html
Creates default index listings using a prettier cascading stylesheet.
Read configuration options from FILE. See "CONFIGURATION FILE" below.
FILE
Print information about the script usage and its options.
Print the entire man page for the command.
The script can read configuration options from a file. By default, it looks for a file named .http_thisrc in the current directory or your home directory. You can specify a different file with the --config option or by setting the HTTP_THIS_CONFIG environment variable.
.http_thisrc
--config
HTTP_THIS_CONFIG
The config file consists of lines in the format key=value. The valid keys are:
key=value
Pedro Melo <melo@cpan.org>
This software is Copyright (c) 2010 by Pedro Melo.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install App::HTTPThis, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::HTTPThis
CPAN shell
perl -MCPAN -e shell install App::HTTPThis
For more information on module installation, please visit the detailed CPAN module installation guide.