|go ahead... be a heretic|
Running multiple Raisin apps on a single Plack serverby cLive ;-) (Prior)
|on Jan 27, 2022 at 17:14 UTC ( #11140903=perlquestion: print w/replies, xml )||Need Help??|
cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question:
I'm loving Raisin as a framework for OpenAPI applications, but I've hit a wall and am needing some fresh eyes.
I want to spin up multiple Raisin apps on the same Plack server, something like this:
But, since Raisin is a functional framework, there's just a single application created, with the second "app" just being concatenated to the first, and with imported methods failing (eg, plugin) because they get imported into the first namespace that uses them.
I'm playing around with possible solutions, but nothing has stuck so far:
What I *think* I need is a way to load Raisin::API and it's dependencies in a scope limited way to lock it to each app's instance, but I can't think of how to do it. Would that be doable, or should I just drop the idea of trying to run multiple Raisin apps under Plack in this way? (yes, this is an odd setup, but it's transitional for a year or two while migrating away from a monolith)
Something like this:
Am I barking up the wrong tree, or just barking mad?
Back to Seekers of Perl Wisdom