in reply to Combine Multiple Catalyst Applications
Helpful reading–
# If you're not reasonably up to date- sudo cpanm Plack Catalyst Catalyst::Devel
# *nix centric. mkdir cattest cd cattest catalyst.pl OneFish catalyst.pl TwoFish vi^W emacs a-one-an-a-two-a.psgi # But I keed!
#!/usr/bin/env perl use strict; use Plack::Builder; use FindBin; use lib "$FindBin::Bin/OneFish/lib", "$FindBin::Bin/TwoFish/lib"; use OneFish; use TwoFish; my $app = builder { mount "/two" => TwoFish->psgi_app(@_); mount "/" => OneFish->psgi_app(@_); # Root needs to be last or it'll eat others. };
env CATALYST_DEBUG=0 plackup a-one-an-a-two-a.psgi HTTP::Server::PSGI: Accepting connections at http://0:5000/
Visit http://localhost:5000/ (or whatever name/ip your box prefers) and http://localhost:5000/two/ and don't forget to tip your servers.
Caveat: this might lead to entangling or making cross-dependent coding choices which would be bad. Make an effort to keep things compartimental. Abstract and separate commonality like sessions/auth. If each app can't run alone after you're done, you might as well have rolled them all into one to start.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Combine Multiple Catalyst Applications
by temporal (Pilgrim) on Apr 13, 2012 at 22:03 UTC | |
by Anonymous Monk on Apr 14, 2012 at 00:54 UTC | |
|
Re^2: Combine Multiple Catalyst Applications
by srchulo (Sexton) on May 09, 2014 at 03:31 UTC | |
by Your Mother (Archbishop) on May 09, 2014 at 03:37 UTC | |
by srchulo (Sexton) on May 09, 2014 at 04:39 UTC |