Skip to content

Instantly share code, notes, and snippets.

@ghedo
Created April 5, 2011 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghedo/903392 to your computer and use it in GitHub Desktop.
Save ghedo/903392 to your computer and use it in GitHub Desktop.
Serve static files from current working directory
#!/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