++ed by:
1 non-PAUSE user
Author image Lucas Tiago de Moraes
and 1 contributors

NAME

Mojolicious::Plugin::Minion::API - Plugin to receive requests from Minion::Backend::API

SYNOPSIS

    use Mojolicious::Lite;
    use Minion;

    plugin 'Minion::API' => {
        minion         => Minion->new(Pg => 'postgresql://postgres@/test'),
        authentication => 'user:pass',
        ips_enabled    => [
            '127.0.0.1',
            '172.16.0.1',
            '192.168.0.1'
        ]
    };

    app->start;

DESCRIPTION

Mojolicious::Plugin::Minion::API is a plugin Mojolicious. This module provides an API to receive request from Minion::Backend::API

OPTIONS

Mojolicious::Plugin::Minion::API supports the following options.

minion

    # Mojolicious::Lite
    plugin 'Minion' => {
        mysql => 'mysql://user@127.0.0.1/minion_jobs'
    };

    plugin 'Minion::API' => {
        minion => app->minion
    };

Minion object to handle backend, this option is mandatory.

pattern

    # Mojolicious::Lite
    plugin 'Minion::API' => {
        pattern => '/minion-api' # https://my-api.com/minion-api
    };

This option is to set pattern in url, see more Mojolicious::Routes::Route#under

authentication

    # Mojolicious::Lite
    plugin 'Minion::API' => {
        authentication => 'user:pass'
    };

This options is to the security of your application, adding a basic authentication.

ips_enabled

    # Mojolicious::Lite
    plugin 'Minion::API' => {
        ips_enabled => [
            '127.0.0.1',
            '172.16.0.1',
            '192.168.0.1'
        ]
    };

This options is to the security of your application, validating ips enabled.

SEE ALSO

Minion::Backend::API, Minion, Mojolicious::Guides, https://mojolicious.org.

AUTHOR

Lucas Tiago de Moraes lucastiagodemoraes@gmail.com

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by Lucas Tiago de Moraes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.