package Peace; use v5.30.0; use strict; use warnings; use Mojo::Base 'Mojolicious'; sub startup { my $self = shift; my $config = $self->config; # Configure the application $self->secrets( $config->{secrets} ); # Router my $r = $self->routes; $r->post('/developer')->to('developer#post'); $r->post('/developer/#identifier/application') ->to('application#developer_application_post'); $r->get('/web/account-verification/#verification_secret') ->to('account_verification#verify'); } sub peace_config { my $self = shift; my $home = $ENV{HOME}; return $self->plugin( JSONConfig => { file => "$home/.config/peace/peace.conf" } ); } 1; =encoding utf8 =head1 NAME Peace - Onlie GNU/Linux flatpak apps store. =head1 SYNOPSIS ./peace =head1 DESCRIPTION Peace is the server backend for flatstore a shop to be able to sell or buy flatpak applications. =head1 FUNCTIONS Peace implements the following functions: =head2 startup For internal usage from Mojolicious. =head2 peace_config my $config = Peace->new->peace_config; Retrieves the config for the peace application. =cut