minecraft 732 Bytes
#!/usr/bin/env perl
use Mojolicious::Lite;

# Documentation browser under "/perldoc"
plugin 'PODRenderer';


get '/' => sub {
	my $self = shift;
	$self->render(
		template 	=> 'index',
		title 		=> 'Welcome',
		layout 		=> 'default',
	);
};

get '/download' => sub {
	my $self = shift;

	my @files = glob("public/data/*.zip");

	my @data;

	foreach my $x (@files) {
		my ( undef, $path, $file ) = split (/\//, $x);
		push @data, $path . "/" . $file;
	} 

	$self->render(
		template 	=> 'download',
		title 		=> 'Download',
		layout 		=> 'default',
		folders		=> \@data,
	);
};

get '/wiki' => sub {
	my $self = shift;
	$self->render(
		template 	=> 'wiki',
		title 		=> 'Wiki',
		layout 		=> 'default',
	);
};

app->start;
__DATA__