ort 8080
darkpan --port 8080
# start a server with AD backed basic auth
# config.json
{
"basic_auth": {
"Realm Name": {
"host": "ldaps://my.ldap.server.org
}
}
}
darkpan --config ./config.json
=head4 Options:
=over 2
=item B<-c,--config> I<default: undef>:
JSON configuration file location
=item B<-p,--port> I<default:
T path(s) for releasing packages, set as the upload_uri in your .pause file
=item B</list>:
JSON list of packages and info about them
=item B</reindex>:
Force OrePAN2 to do a index all
ub list($self) {
my $util = Mojo::Darkpan::Util->new(controller => $self);
$self->render(json => $util->list) if ($util->authorized);
}
sub reindex($self) {
my $util = Mojo::Darkpan::Uti
ious::Plugin};
use Cwd ();
use Encode ();
use DirHandle;
use Mojolicious::Types;
use Mojo::JSON qw(encode_json);
use Mojo::Darkpan::Config;
my $dir_page = <<'PAGE';
<html>
<head>
<title>Index of
my $handler = $args->{handler};
my $auto_index = $args->{auto_index} // 1;
my $json = $args->{json};
my $delivery_path = $args->{delivery_path} || $root;
$dir_page = $args->{dir_pa
}
if (-d $path) {
render_indexes($c, $path, $json) unless not $auto_index;
return;
}
if (-f $pa
package Mojo::Darkpan::Config;
use v5.20;
use Moo;
use JSON;
use Mojo::File;
use Cwd;
use Data::Dumper;
has _config => (is => 'lazy');
has directory => (is => 'lazy');
has compressIndex => (is => 'la
ateAssetLocation($location);
my $file = Mojo::File->new($location);
my $config = JSON->new->utf8->decode($file->slurp);
return $config;
}
return undef;
}
sub _build