Factor out some helper functions for building `config.json` files, and adding the relevant routes to browser contexts.