def code():
    # file monitor server
    observer = Observer()

    # py yml file monitor
    patterns = ['*.py', '*demo.yml']                # '*' is necessary, and must in the first.
    restart_processor = ServerStarter([
        {'cmd': 'rm -rf %s/*.log' % os.path.join(workspace, 'log'), 'is_daemon': False},
        {'cmd': './run.py run', 'network_port': (config['simple_server']['port'],)}
    ])
    monitor = SourceCodeMonitor(restart_processor, patterns)
    observer.schedule(monitor, program_dir, recursive=True)
    observer.schedule(monitor, http_api.__path__[0], recursive=True)

    # # rebuild css and js's min file while source file is change
    # patterns = ['*.css', '*.js', '*static.yml']     # '*' is necessary, and must in the first.
    # monitor = SourceCodeMonitor(BuildCssJsProcessor(program_dir, static), patterns, None, 500)
    # observer.schedule(monitor, program_dir, recursive=True)

    # start monitoring
    observer.start()
    try:
        time.sleep(31536000)    # one year
    except __HOLE__:
        observer.stop()


# shell interface
dataset/ETHPy150Open remyzane/flask-http-api/example/run.py/code