@@ -0,0 +1,1289 @@
+# -*- coding: utf-8 -*-%0A%0Aimport logging%0Aimport tornado.httpserver%0Aimport tornado.ioloop%0Aimport tornado.netutil%0Aimport tornado.process%0Aimport tornado.web%0A%0Alogger = logging.getLogger(__name__)%0A%0A%0Adef start_http(app: tornado.web.Application, http_port: int = 80):%0A    %22%22%22Create app instance(s) binding a port.%0A%0A    :param app: the app to execute in server instances%0A    :param http_port: port to bind%0A    %22%22%22%0A    http_socket = tornado.netutil.bind_sockets(http_port)  # HTTP socket%0A    try:  # try to create threads%0A        tornado.process.fork_processes(0)  # fork%0A    except KeyboardInterrupt:  # except KeyboardInterrupt to %22properly%22 exit%0A        tornado.ioloop.IOLoop.current().stop()%0A    except AttributeError:  # OS without fork() support ...%0A        logger.warning('Can%5C' fork, continuing with only one (the main) thread ...')%0A        pass  # do nothing and continue without multi-threading%0A    logger.info('Start an HTTP request handler on port : ' + str(http_port))%0A    tornado.httpserver.HTTPServer(app).add_sockets(http_socket)  # bind http port%0A    try:  # try to stay forever alive to satisfy user's requests, except KeyboardInterrupt to %22properly%22 exit%0A        tornado.ioloop.IOLoop.current().start()%0A    except KeyboardInterrupt:%0A        tornado.ioloop.IOLoop.current().stop()%0A

Create server.py