@cli.command(name=u'serve')
@click.option(u'-f', u'--config-file', type=click.File(u'rb'), help=config_help)
@click.option(u'-a', u'--dev-addr', help=dev_addr_help, metavar=u'<IP:PORT>')
@click.option(u'-s', u'--strict', is_flag=True, help=strict_help)
@click.option(u'-t', u'--theme', type=click.Choice(theme_choices), help=theme_help)
@click.option(u'-e', u'--theme-dir', type=click.Path(), help=theme_dir_help)
@click.option(u'--livereload', u'livereload', flag_value=u'livereload', help=reload_help, default=True)
@click.option(u'--no-livereload', u'livereload', flag_value=u'no-livereload', help=no_reload_help)
@click.option(u'--dirtyreload', u'livereload', flag_value=u'dirty', help=dirty_reload_help)
@common_options
def serve_command(dev_addr, config_file, strict, theme, theme_dir, livereload):
 logging.getLogger(u'tornado').setLevel(logging.WARNING)
 strict = (strict or None)
 try:
  serve.serve(config_file=config_file, dev_addr=dev_addr, strict=strict, theme=theme, theme_dir=theme_dir, livereload=livereload)
 except (exceptions.ConfigurationError, socket.error) as e:
  raise SystemExit((u'\n' + str(e)))

@ cli . command ( name = u'serve' ) @ click . option ( u'-f' , u'--config-file' , type = click . File ( u'rb' ) , help = config_help ) @ click . option ( u'-a' , u'--dev-addr' , help = dev_addr_help , metavar = u'<IP:PORT>' ) @ click . option ( u'-s' , u'--strict' , is_flag = True , help = strict_help ) @ click . option ( u'-t' , u'--theme' , type = click . Choice ( theme_choices ) , help = theme_help ) @ click . option ( u'-e' , u'--theme-dir' , type = click . Path ( ) , help = theme_dir_help ) @ click . option ( u'--livereload' , u'livereload' , flag_value = u'livereload' , help = reload_help , default = True ) @ click . option ( u'--no-livereload' , u'livereload' , flag_value = u'no-livereload' , help = no_reload_help ) @ click . option ( u'--dirtyreload' , u'livereload' , flag_value = u'dirty' , help = dirty_reload_help ) @ common_options def serve_command ( dev_addr , config_file , strict , theme , theme_dir , livereload ) : logging . getLogger ( u'tornado' ) . setLevel ( logging . WARNING ) strict = ( strict or None ) try : serve . serve ( config_file = config_file , dev_addr = dev_addr , strict = strict , theme = theme , theme_dir = theme_dir , livereload = livereload ) except ( exceptions . ConfigurationError , socket . error ) as e : raise SystemExit ( ( u'\n' + str ( e ) ) )
serve a single command .