Skip to content

Instantly share code, notes, and snippets.

@ghedo
Created Apr 5, 2011
Embed
What would you like to do?
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