Adding hypnotoad support.

This commit is contained in:
sergiotarxz 2020-12-29 12:00:55 +01:00
parent 7a9870d517
commit 6b390359df
Signed by: sergiotarxz
GPG Key ID: E5903508B6510AC2
5 changed files with 23 additions and 1 deletions

View File

@ -1,7 +1,9 @@
.proverc
AUTHORS
bin/peertube-dl
bin/peertube-dl-hypnotoad
bin/peertube-dl-web
bin/peertube-dl-web.conf
cpanfile
lib/Peertube/DL.pm
lib/Peertube/DL/Downloaders.pm

7
bin/peertube-dl-hypnotoad Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env perl
use Mojo::Server::Hypnotoad;
use File::Basename;
my $hypnotoad = Mojo::Server::Hypnotoad->new;
$hypnotoad->run( dirname(__FILE__) . '/peertube-dl-web' );

View File

@ -40,5 +40,7 @@ post '/proxy_to_get' => sub {
push @{ app->renderer->paths }, ( Peertube::DL::getDir() . '/Peertube/DL/templates' );
push @{ app->static->paths }, ( Peertube::DL::getDir() . '/Peertube/DL/public' );
app->start;
my $config = plugin 'Config';
app->start;

9
bin/peertube-dl-web.conf Normal file
View File

@ -0,0 +1,9 @@
{
hypnotoad => {
listen => ['http://127.0.0.1:3001'],
workers => 6,
clients => 3,
proxy => 1,
pid_file => $ENV{PIDFILE} || '/var/run/peertube-dl-web.pid',
}
};

View File

@ -5,3 +5,5 @@ requires 'LWP::Protocol::https';
requires 'Mojolicious::Lite';
requires 'Test::Most';
requires 'Test::MockObject';
requires 'Mojo::Server::Hypnotoad';
requires 'Getopt::Long::Descriptive';