def start_httpd(self): self.server = comm.create_httpd(self.port, self.doc_root, self.ws, "", self.ssl) if self.daemon == True : comm.logger.info( "Start as daemon" ) comm.daemonize() else: pass if self.debug == True: comm.logger.setLevel(logging.DEBUG) self.server.start() return self.server
def main(): global srv srv = comm.create_httpd(8080, "Y:\html", ws_sample) srv.start() return srv