There are a couple of options and it depends on whether your web server, say jetty, is a component itself.
In general there are three options:
* assoc dependencies to the request. This can be done in some middleware. The resource created with liberator can pull the values from the request where necessary
* use parametrized resources. In this case the dependencies need to be passed to the resource function to create the handler. This typically has impact on the way that you defined the routing
* wrap every liberator resource in a component and have component pass in the dependencies. You will need another component that depends on all the resources and does the routing. As an alternative, that component could iterator over the system and collect all the liberator resources. This is what
https://modularity.org/ suggests
* use dynamic binding or global vars to hold values for the resources. This typically neither scales nor compose and is not recommended by me.
All approaches have different tradeoffs regarding modularity and testing. You will need to find your preferred poison here. I'm pretty sure that there are more possibilities.