view MoinMoin/support/flup/server/ @ 4303:eb463542664e

Move flup also to support (now that it's added to path we can just ship it)
author Florian Krupicka <>
date Thu, 14 Aug 2008 00:59:13 +0200
parents contrib/flup-server/flup/server/
children 6049883eb89e
line wrap: on
line source
def helper(wsgiServerClass, global_conf, host, port, **local_conf):
    # I think I can't write a tuple for bindAddress in .ini file
    host = host or global_conf.get('host', 'localhost')
    port = port or global_conf.get('port', 4000)

    if 'socket' in local_conf:
        local_conf['bindAddress'] = local_conf['socket']
        del local_conf['socket']
        local_conf['bindAddress'] = (host, int(port))
    def server(application):
        server = wsgiServerClass(application, **local_conf)

    return server