def __init__(self): handlers=[(r"/push/subscribe", SubHandler) ] self.websockets = [] self.db = motor.MotorClient(options.mongo_url).contact #load proxy config MickeyWsHttpGate.initial(options.proxycfg) tornado.web.Application.__init__(self, handlers, debug=True)