register a routing rule

    Example:

         route('GET', '/path/<param>', handler)

def route(method, pattern, handler=None):
    """register a routing rule

    Example:

         route('GET', '/path/<param>', handler)

    """
    if handler is None:
        return partial(route, method, pattern)
    return routes.append(method, pattern, handler)