1
0
mirror of https://github.com/dani/vroom.git synced 2024-06-01 21:11:41 +02:00
vroom/script/start_server.pl
Daniel Berteaud 0f17145a58 Rename scripts to script
So we're closer to a standard MOjolicious app
2015-07-22 00:12:07 +02:00

27 lines
581 B
Perl
Executable File

#!/usr/bin/env perl
use strict;
use warnings;
use File::Basename;
use lib dirname($0) . '/../lib';
use Vroom::Conf;
chdir dirname($0) . '/..';
my $config = Vroom::Conf::get_conf();
$ENV{'PERL5LIB'} = 'lib';
$ENV{'MOJO_REVERSE_PROXY'} = 1;
if ($config->{'daemon.backend'} eq 'morbo'){
exec ('/usr/bin/morbo',
'-l', 'http://' . $config->{'daemon.listen_ip'} . ':' . $config->{'daemon.listen_port'},
'-w', 'conf/settings.ini',
'-w', 'lib',
'-w', 'templates',
'-v', 'vroom.pl');
}
else{
exec ('/usr/bin/hypnotoad', '-f', 'vroom.pl');
}