<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_app(httpd_config):
 """ Factory for the monitoring webapp. """

    #mimetypes.add_type('image/vnd.microsoft.icon', '.ico')

    # Default paths to serve static file from
    htdocs_paths = [
        os.path.realpath(os.path.join(config.config_dir, "htdocs")),
        os.path.join(os.path.dirname(config.__file__), "data", "htdocs"),
    ]

    return (Router()
        .add_route("/", controller=redirect, to="/static/index.html")
        .add_route("/favicon.ico", controller=redirect, to="/static/favicon.ico")
        .add_route("/static/{filepath:.+}", controller=StaticFolders(htdocs_paths))
        .add_route("/json/{action}", controller=JsonController(**httpd_config.json))
    )