The proxy mapping should handle HTTP & HTTPS. See documentation here.
Are you installing the app in the virtual CORE before executing? In that case, the sample code runs the unix socket server, not http.
def run_webserver_unixsock():
"""run_webserver_unixsock"""
sock_dir = os.getenv("SNAP_DATA") + "/package-run/sdk-py-webserver/"
if not os.path.exists(sock_dir):
os.makedirs(sock_dir)
sock_file = sock_dir + "web.sock"
try:
os.unlink(sock_file)
except OSError:
pass
with web.unix_socket_server.UnixSocketServer(
sock_file, web.request_handler.RequestHandler
) as http_server:
print("UNIX SOCKET server started - listening on", sock_file, flush=True)
http_server.serve_forever()
http_server.server_close()
os.remove(sock_file)
I would suggest trying some remote debugging to see where this is getting hung up.
... View more