def METHOD_NAME(port=None,dir=None):
    print('__ switching to directory',dir);
    os.chdir(dir)
    with tempfile.TemporaryDirectory(dir=dir) as tempdname:
        print('.... Starting main function',tempdname)
        v=Server(port,tempdname)
        v.createHTTPServer()
        asyncio.run(v.createWSServer())