Creating a static website with Perl

learn.perl.org
 

Save the following into a file called app.psgi

#!/usr/bin/perl
use strict;
use warnings;

# Serve static files from document root with a directory index
# app.psgi
use Plack::App::Directory;
my $app = Plack::App::Directory->new({ 
                root => "/path/to/htdocs" 
            })->to_app;

Then run

> plackup
> Accepting connections at http://0:5000/
Bookmark and Share