I have an existing server written using the Servant library. I now want to make the endpoints conditional such that based on certain configuration or logic, I would like to serve (or not serve) a particular endpoint. What's the best way to do this?
I've tried using EmptyAPI
from Servant.API
but it didn't work.
For context, I'm currently using toServant
from Servant.API.Generic
for most of my routes.