# default port 5000importnetworkimporttimeimportasynciofrommicrodotimportMicrodot# === Connect to Wi-Fi ===ssid='<ssid>'password='<pass>'wlan=network.WLAN(network.STA_IF)wlan.active(True)wlan.connect(ssid,password)print('Connecting to WiFi...',end='')whilenotwlan.isconnected():print('.',end='')time.sleep(1)print('\nConnected. IP:',wlan.ifconfig()[0])app=Microdot()@app.route('/')asyncdefindex(request):return'Hello, world!'asyncdefmain():# start the server in a background taskserver=asyncio.create_task(app.start_server())# ... do other asynchronous work here ...# cleanup before ending the applicationawaitserverasyncio.run(main())