run_delete.py 396 B

123456789101112
  1. import uvicorn
  2. import argparse
  3. if __name__ == '__main__':
  4. parser = argparse.ArgumentParser()
  5. parser.add_argument('--host', default='0.0.0.0')
  6. parser.add_argument('--port', default=8000)
  7. opt = parser.parse_args()
  8. app_str = 'delete:app' # make the app string equal to whatever the name of this file is
  9. uvicorn.run(app_str, host=opt.host, port=int(opt.port), reload=True)