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.
In reply to Re: Combine Multiple Catalyst Applications
by Your Mother
in thread Combine Multiple Catalyst Applications
by temporal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |