import re


def apply_default_port(nodes):
    """
    Adds the default port if the port is missing.

    @type  nodes: string
    @param nodes: A comma seprated list of nodes
    @rtype:       array of strings
    @return:      The nodes with the port postfixed on each one
    """
    nodes = nodes.split(',')
    def append_port(node):
        if re.match('.*:\d+$', node):
            return node
        return node + ':8091'
    return [append_port(x) for x in nodes]