blob: cd90b8b4f7aa832f1edcb7433d8d6d0177aa869f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
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)
local_conf['bindAddress'] = (host, int(port))
def server(application):
server = wsgiServerClass(application, **local_conf)
server.run()
return server
|