as would be a best practice in the real world, since globalizing the routing module is the easiest way to use it also there are some sketches in there. comments really
this is the bridge to allow users to control how to route incoming requests to particular resources. it's also the path to killing off the servables structure. need to work out some details, like route contribution (word) and the actual connection of the routes but this is pretty much the design
this is step one. step two is to make extension handling part of the trie structure. the plan is to refactor SeparatorNode logic into a base class and make a new subclass that essentially acts the same, but with special rules - only one per path through the trie, and it disallows SeparatorNodes to follow it
but i think just a Pattern isn't going to do it, there will need to be a class that implements some interface
welcome to the 21st century, watch service! mainly this is to support the idea that configurations will be per-environment, and programmatically updateable in that regard, i envision something like var env = ('jj/env'); var rc = require('jj/resource-configuration'); rc.watchFiles(env.STAGE == 'Development'); or similar. this doesn't include the actual script piece yet! haha
while i think about it. it definitely isn't right yet
DRY IT UP! woo woo.
loading resource settings logic is now correctly centralized and tested, and the system is ready to accept overrides. however first I need to dry out the default configurations so they are defined in one place and used for both config-free and config-with-default scenarios
not totally hooked up yet, but the mechanism works and is tested. next step is to use it!