I'm writing a script which will manage ports of my mojo apps.
my $hypnotoad = Mojo::Server::Hypnotoad->new;
$hypnotoad->configure('server.conf');
$hypnotoad->run('server.pl');
If I need to specify port other than 8080 - I need to setup it in server.conf like
{
hypnotoad => {
listen => ['http://*:8093'],
}
};
Is there any way to setup it directly, without external config file ?
I found that Mojo::Server::Hypnotoad has
listen attribute but it seems doesn't work or I'm using it wrong way:
I'm getting
Can't locate object method "listen" via package "Mojo::Server::Hypnotoad"
error
Any suggestions appreciated.