parameters: (app)
docstring: Parse command line options and start the server.
docstring_summary: Parse command line options and start the server.
docstring_tokens: Parse command line options and start the server .
function: def start_from_terminal(app):
      """
      Parse command line options and start the server.
      """
      parser = optparse.OptionParser()
      # Store the file argument into the filename attr
      # parser.add_option("-f", "--file", action="store", type="string", dest="filename")
      parser.add_option(
          '-d', '--debug',
          help="enable debug mode",
          action="store_true", default=False)
      parser.add_option(
          '-p', '--port',
          help="which port to serve content on", action="store",dest="port", type='int', default=5000)
      parser.add_option(
          '-c', '--config',
          help="the model configuration file",action="store",dest="config_file",
          type='string', default="config.json")
      opts, args = parser.parse_args()
      app.mapmatcher = MapMatcher(opts.config_file)
      if opts.debug:
          app.run(debug=True, host='0.0.0.0', port=opts.port)
      else:
          start_tornado(app, opts.port)
function_tokens: def start_from_terminal ( app ) : parser = optparse . OptionParser ( ) # Store the file argument into the filename attr # parser.add_option("-f", "--file", action="store", type="string", dest="filename") parser . add_option ( '-d' , '--debug' , help = "enable debug mode" , action = "store_true" , default = False ) parser . add_option ( '-p' , '--port' , help = "which port to serve content on" , action = "store" , dest = "port" , type = 'int' , default = 5000 ) parser . add_option ( '-c' , '--config' , help = "the model configuration file" , action = "store" , dest = "config_file" , type = 'string' , default = "config.json" ) opts , args = parser . parse_args ( ) app . mapmatcher = MapMatcher ( opts . config_file ) if opts . debug : app . run ( debug = True , host = '0.0.0.0' , port = opts . port ) else : start_tornado ( app , opts . port )