old_contents: from tornado.ioloop import IOLoop
  from tornado.options import define, options
  from tornado import httpserver
  from tornado.web import Application
  from dockyard.route import routes
  from dockyard.var import GLOBAL
  
  def main(options):
      GLOBAL.mongo(options.mongo_host, options.mongo_port, options.database)
  
      settings = {"login_url"     : "/auth/login",
                  "debug"         : options.debug,
                  "cookie_secret" : "233"}
      app = Application(routes, **settings)
      server = httpserver.HTTPServer(app)
      server.bind(options.port, options.address)
      server.start(options.process)
  
      IOLoop.instance().start()
  
  if __name__ == "__main__":
      define("address",       "127.0.0.1",        str,    "dockyard address")
      define("port",          8080,               int,    "dockyard port")
      define("process",       1,                  int,    "process")
      define("debug",         True,               bool,   "debug")
  
      define("mongo_host",    "127.0.0.1",        str,    "mongodb host")
      define("mongo_port",    27017,              int,    "mongodb port")
      define("database",      "dockyard",         str,    "mongodb name")
  
      options.parse_command_line()
      main(options)
new_contents: from tornado.ioloop import IOLoop
  from tornado.options import define, options
  from tornado import httpserver
  from tornado.web import Application
  from dockyard.route import routes
  from dockyard.var import GLOBAL
  
  def main(options):
      GLOBAL.mongo(options.mongo_host, options.mongo_port, options.database)
  
      settings = {"login_url"     : "/auth/login",
                  "debug"         : options.debug,
                  "cookie_secret" : "233"}
      app = Application(routes, **settings)
      server = httpserver.HTTPServer(app)
      server.bind(options.port, options.address)
      server.start(options.process)
  
      IOLoop.instance().start()
  
  if __name__ == "__main__":
      define("address",       "0.0.0.0",        str,    "dockyard address")
      define("port",          8080,               int,    "dockyard port")
      define("process",       1,                  int,    "process")
      define("debug",         True,               bool,   "debug")
  
      define("mongo_host",    "127.0.0.1",        str,    "mongodb host")
      define("mongo_port",    27017,              int,    "mongodb port")
      define("database",      "dockyard",         str,    "mongodb name")
  
      options.parse_command_line()
      main(options)
subject: Update entry ip