Mojolicious-Plugin-DirectoryServer

 view release on metacpan or  search on metacpan

lib/iniweb.pm  view on Meta::CPAN

package iniweb;

use feature ':5.16';
use ojo;

sub import {
	$ENV{PERL_MINIWEB_ROOT}       //= '.';
	$ENV{PERL_MINIWEB_DIR_INDEX}  //= 'index.html:index.htm';

	local @ARGV = 'daemon';
	my %opts = (
		root       => $ENV{PERL_MINIWEB_ROOT},
		dir_index  => [ split ':', $ENV{PERL_MINIWEB_DIR_INDEX} ],
	);
	a->plugin( DirectoryServer => %opts )->start;

	exit( 0 );
}

1;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.035 second using v1.00-cache-2.02-grep-82fe00e-cpan-c9a218a2bbc )