use DirHandle;
use Mojo::Base qw{ Mojolicious::Plugin };
use Mojolicious::Types;
use Mojo::JSON qw(encode_json);
# Stolen from Plack::App::Direcotry
my $dir_page = <<'PAGE';
<html><head>
<title>Ind
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(
h(1));
return;
}
render_indexes( $c, $path, $json ) unless not $auto_index;
}
},
);
return $app;
}
sub locate_index {