|
NAMEToadfarm - One Mojolicious app to rule them allVERSION0.83DESCRIPTIONToadfarm is a module for configuring and starting your Mojolicious applications. You can either combine multiple applications in one script, or just use it as a init script.Core features:
SYNOPSISScriptHere is an example script that sets up logging and mounts some applications under different domains, as well as loading in some custom plugins.See Toadfarm::Manual::DSL for more information about the different functions. #!/usr/bin/perl use Toadfarm -init; logging { combined => 1, file => "/var/log/toadfarm/app.log", level => "info", }; mount "MyApp" => { Host => "myapp.example.com", config => { config_parameter_for_myapp => "foo" }, }; mount "/path/to/app" => { Host => "example.com", mount_point => "/other", }; mount "Catch::All::App"; plugin "Toadfarm::Plugin::AccessLog"; start; # needs to be at the last line UsageYou don't have to put "Script" in init.d, but it will work with standard start/stop actions.$ /etc/init.d/your-script reload $ /etc/init.d/your-script start $ /etc/init.d/your-script stop See also "Init script" in Toadfarm::Manual::RunningToadfarm for more details. You can also start the application with normal Mojolicious commands: $ morbo /etc/init.d/your-script $ /etc/init.d/your-script daemon DOCUMENTATION INDEX
PLUGINS
PREVIOUS VERSIONSToadfarm prior to version 0.49 used to be a configuration file loaded in by the "toadfarm" script. This resulted in all the executables to be named "toadfarm" instead of something descriptive. It also felt a bit awkward to take over "MOJO_CONFIG" and use all the crazy hacks to start "hypnotoad".It also didn't work well as an init script, so there still had to be a seperate solution for that. The new Toadfarm DSL aim to solve all of these issues. This means that if you decide to still use any "MOJO_CONFIG", it should be for the applications loaded from inside "Toadfarm" and not the startup script. Note that the old solution still works, but a warning tells you to change to the new DSL based API. COPYRIGHT AND LICENSECopyright (C) 2014, Jan Henning ThorsenThis program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0. AUTHORJan Henning Thorsen - "jhthorsen@cpan.org"
Visit the GSP FreeBSD Man Page Interface. |