GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TOADFARM::MANUAL::INTRO (3)

.ds Aq ’

NAME

Toadfarm::Manual::Intro - Introduction to Toadfarm

CONTENTS

DESCRIPTION

This manual aims to give an introduction to how to set up toadfarm.

    Script

First you need to create a basic script to describe when an application will be triggered. This is a plain Perl script which allow you to pull in any trick you like from the Perl toolbox.

Example:



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

  mount "/home/web/project1/script/app1" => {
    "X-Request-Base" => "http://mydomain.com/whatever"
  };

  mount "Web::App2" => {
    "Host" => "mydomain.com",
  };

  start;



The script above will pass the request on to app1 when the X-Request-Base header is set to http://mydomain.com/whatever. Or it will pass the request on to Web::App2 if the Host header is set to mydomain.com.

You can save the content of the file anywhere and run it as any other Mojolicious application.

Note: There are other special fields to trigger on, besides HTTP headers. See Apps in Toadfarm::Manual::Config for more details.

    Start Toadfarm

After you have saved the config file, you can start the Toadfarm application:



  $ /path/to/your-script start



After this, you should see your-script running and the applications can be accessed from <http://localhost:8080>.

    Further reading

See Toadfarm::Manual::RunningToadfarm for more command line options, and Toadfarm::Manual::Config for full list of config file options.

SEE ALSO

Toadfarm::Manual::Config.

Toadfarm::Manual::RunningToadfarm.

AUTHOR

Jan Henning Thorsen - jhthorsen@cpan.org
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TOADFARM::MANUAL::INTRO (3) 2016-01-02

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.