code: def runserver(ctx, conf, port, foreground):
      
      config = read_config(conf)
  
      debug = config['conf'].get('debug', False)
      click.echo('Debug mode {0}.'.format('on' if debug else 'off'))
  
      port = port or config['conf']['server']['port']
  
      app_settings = {
          'debug': debug,
          'auto_reload': config['conf']['server'].get('auto_reload', False),
      }
      handlers_settings = __create_handler_settings(config)
  
      if foreground:
          click.echo('Requested mode: foreground')
          start_app(port, app_settings, handlers_settings)
      else:
          click.echo('Requested mode: background')
          # subprocess.call([sys.executable, 'yourscript.py'], env=os.environ.copy())
          raise NotImplementedError
docs: Run the fnExchange server