Created
April 5, 2011 10:24
-
-
Save ghedo/903392 to your computer and use it in GitHub Desktop.
Serve static files from current working directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Usage: httpme | |
# Serve static files from current working directory | |
use Cwd; | |
use Plack::Runner; | |
use Plack::App::Directory; | |
my $runner = Plack::Runner -> new; | |
my $app = Plack::App::Directory -> new({root => getcwd}) -> to_app; | |
$runner -> parse_options(@ARGV); | |
$runner -> run($app); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment