<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Toadfarm - One Mojolicious app to rule them all

VERSION
    0.16

SYNOPSIS
  Production
    You can start the application by running:

      $ toadfarm myconfig.conf;

    "myconfig.conf" should contain a list with the application you want to
    run and a set of HTTP headers to act on. Example:

      {
        apps =&gt; [
          'My::App' =&gt; {
            'X-Request-Base' =&gt; 'http://mydomain.com/whatever',
            'config' =&gt; { app_config =&gt; 123 },
          },
          '/path/to/my-app' =&gt; {
            'Host' =&gt; 'mydomain.com',
          },
        ],
      }

    The config above will run "My::App" when the "X-Request-Base" header is
    set to "http://mydomain.com/whatever".

    Or it will pass the request on to "/path/to/my-app" if the "Host" header
    is set to "mydomain.com".

    The apps are processed in the order they are defined. This means that
    the first app that match will be executed.

  Application config
    The application will load the config as you would expect, but it is also
    possible to override the app config from the toadfarm config. This is
    especially useful when starting an app installed from cpan:

      apps =&gt; {
        # https://metacpan.org/module/App::mojopaste
        '/usr/local/bin/mojopaste' =&gt; {
          Host =&gt; 'p.thorsen.pm',
          config =&gt; {
            paste_dir =&gt; '/some/other/location
          },
        },
      },

    NOTE! This config will be override the default application config.

  Debug
    It is possible to start the server in foreground as well:

      $ MOJO_CONFIG=myconfig.conf toadfarm prefork
      $ MOJO_CONFIG=myconfig.conf toadfarm daemon

    See other options by running:

      $ toadfarm -h

DESCRIPTION
    This application can be used to load other Mojolicious apps inside one
    app. This could be useful if you want to save memory or instances on
    dotcloud or heroku.

CONFIG FILE
    Additional config params.

      {
        apps =&gt; [...], # See SYNOPSIS
        secret =&gt; 'some super duper unique string',
        log =&gt; {
          file =&gt; '/path/to/log/file.log',
          level =&gt; 'debug', # debug, info, warn, ...
          combined =&gt; 1, # true to make all applications log to the same file
        },
        hypnotoad =&gt; {
          listen =&gt; ['http://*:1234'],
          workers =&gt; 12,
          # ...
        },
        paths =&gt; {
          renderer =&gt; [ '/my/custom/template/path' ],
          static =&gt; [ '/my/custom/static/path' ],
        },
        plugins =&gt; [
          MojoPlugin =&gt; CONFIG,
        ],
      }

    *   log

        Used to set up where Toadfarm should log to. It is also possible to
        set "combined" to true if you want all the other apps to log to the
        same file.

    *   hypnotoad

        See "SETTINGS" in Mojo::Server::Hypnotoad for more "hypnotoad"
        settings.

    *   paths

        Set this to enable custom templates and public files for this
        application. This is useful if you want your own error templates or
        serve other assets from Toadfarm.

    *   plugins

        "plugins" can be used to load plugins into Toadfarm. The plugins are
        loaded after the "apps" are loaded. They will receive the "CONFIG"
        as the third argument:

          sub register {
            my($self, $app, CONFIG) = @_;
            # ...
          }

        See also: "SYNOPSIS" in Toadfarm::Plugin::Reload.

EXAMPLE SETUP
    Look at &lt;https://github.com/jhthorsen/toadfarm/tree/etc/&gt; for example
    resources which show how to start Toadfarm on ubuntu. In addition, you
    can forward all traffic to the server using the "iptables" rule below:

      $ iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080

PLUGINS
    Toadfarm::Plugin::Reload.

METHODS
  startup
    This method will read the "MOJO_CONFIG" and mount the applications
    specified.

AUTHOR
    Jan Henning Thorsen - "jhthorsen@cpan.org"

</pre></body></html>