start_testing_api_server 457 B

123456789101112131415161718
  1. #!/usr/bin/env python3
  2. import os, sys
  3. sys.path.insert(
  4. 0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../src")),
  5. )
  6. from wsgiref.simple_server import make_server
  7. from med_testing_apis.server import get_server, get_port, get_hostname
  8. if __name__ == "__main__":
  9. print("See testing api server at the following address and port:")
  10. print(f"http://{get_hostname()}:{get_port()}/")
  11. server = get_server()
  12. server.serve_forever()