I'm writing a script which will manage ports of my mojo apps. 

E.g. I want to manage server.pl app:

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 
<https://metacpan.org/pod/release/SRI/Mojolicious-7.26/lib/Mojo/Server/Daemon.pm#listen>
 
attribute but it seems doesn't work or I'm using it wrong way:

my $hypnotoad = Mojo::Server::Hypnotoad->new;
$hypnotoad->listen(['https://127.0.0.1:8093']);
$hypnotoad->run('server.pl');

I'm getting 
Can't locate object method "listen" via package "Mojo::Server::Hypnotoad"
error

Any suggestions appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to