Jan Henning Thorsen > Toadfarm > Toadfarm::Plugin::Reload

Download:
Toadfarm-0.66.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

Toadfarm::Plugin::Reload - Reload toadfarm with new code

DESCRIPTION ^

This Mojolicious plugin allows the "Toadfarm" server to restart when a resource is hit with a special JSON payload. The payload needs to be compatible with the post-receive-hook github use.

SETUP ^

SYNOPSIS ^

  #!/usr/bin/env perl
  use Toadfarm -init;

  # mount applications, set up logging, ...

  plugin "Toadfarm::Plugin::Reload" => {
    path         => "/some/private/path",
    repositories => [
      {
        name   => "cool-repo",
        branch => "some-branch",
        path   => "/path/to/cool-repo",
        remote => "whatever",           # default="origin"
      },
    ],
  };

  start;

Configuration details:

METHODS ^

register

  $self->register($app, \%config);

See "SYNOPSIS" for %config parameters.

AUTHOR ^

Jan Henning Thorsen - jhthorsen@cpan.org

syntax highlighting: