PoorBooru/lib/PoorBooru.pm
2023-03-05 17:23:13 +00:00

27 lines
422 B
Perl

package PoorBooru;
use v5.36;
use strict;
use warnings;
use Mojo::Base "Mojolicious";
use SeaweedFS::Client;
sub startup ($self)
{
$self->moniker("poorbooru");
my $config = $self->plugin("Config");
$self->secrets($config->{secrets});
$self->helper(seaweed => sub {
state $client =
SeaweedFS::Client->new($config->{seaweedfs_master})
});
my $r = $self->routes;
$r->get("/")->to("gallery#index");
}
1;