servant-polysemy
is a Haskell library that makes it easier to use Servant and Polysemy together.
Check out these examples for how to use it:
The client will connect to either version of the server and interact with its endpoint, which simply serves up the package version.