Encode ();
use DirHandle;
use Mojo::Base qw( Mojolicious::Plugin -signatures );
use Mojo::JSON qw(encode_json);
use Mojolicious::Types;
# Stolen from Plack::App::Direcotry
my $dir_page = <<'PAGE';
<
index = $args->{dir_index};
my $auto_index = $args->{auto_index} // 1;
my $json = $args->{json};
$dir_page = $args->{dir_page} if ( $args->{dir_page} );
$app->hook(
}
if( $auto_index ) {
render_indexes( $c, $path, $json );
} else {
$c->reply->not_found;
}