Adding listen shortcut.
This commit is contained in:
parent
3385809e09
commit
1cd463434a
@ -4,19 +4,25 @@ use Mojo::Base 'Mojolicious', -signatures;
|
||||
# This method will run once at server start
|
||||
sub startup ($self) {
|
||||
|
||||
# Load configuration from config file
|
||||
my $config = $self->plugin('NotYAMLConfig');
|
||||
# Load configuration from config file
|
||||
my $config = $self->plugin('NotYAMLConfig');
|
||||
$self->config(
|
||||
hypnotoad => {
|
||||
proxy => 1,
|
||||
listen => [ $self->config('listen') // 'http://localhost:3000' ]
|
||||
}
|
||||
);
|
||||
|
||||
# Configure the application
|
||||
$self->secrets($config->{secrets});
|
||||
# Configure the application
|
||||
$self->secrets( $config->{secrets} );
|
||||
|
||||
# Router
|
||||
my $r = $self->routes;
|
||||
# Router
|
||||
my $r = $self->routes;
|
||||
|
||||
# Normal route to controller
|
||||
$r->get('/get_pay_url/:uuid')->to('Main#get_url');
|
||||
$r->get('/set_paid/:uuid')->to('Main#set_paid');
|
||||
$r->get('/get_paid/:uuid')->to('Main#get_paid');
|
||||
# Normal route to controller
|
||||
$r->get('/get_pay_url/:uuid')->to('Main#get_url');
|
||||
$r->get('/set_paid/:uuid')->to('Main#set_paid');
|
||||
$r->get('/get_paid/:uuid')->to('Main#get_paid');
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user