Modular middleware and server config