mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-03-28 17:42:54 +01:00
25 lines
576 B
Perl
25 lines
576 B
Perl
package Mounter;
|
|
use Mojo::Base 'Mojolicious';
|
|
use FindBin qw($Bin);
|
|
use File::Spec qw(catfile);
|
|
|
|
# This method will run once at server start
|
|
sub startup {
|
|
my $self = shift;
|
|
|
|
push @{$self->commands->namespaces}, 'Lutim::Command';
|
|
|
|
my $config = $self->plugin('Config' =>
|
|
{
|
|
file => File::Spec->catfile($Bin, '..' ,'lutim.conf'),
|
|
default => {
|
|
url_sub_dir => '/'
|
|
}
|
|
}
|
|
);
|
|
|
|
$self->plugin('Mount' => {$config->{url_sub_dir} => File::Spec->catfile($Bin, '..', 'script', 'application')});
|
|
}
|
|
|
|
1;
|