// function: func(S uri, SS params) -> NanoHTTPD.Response or string static MyHTTPD serveHttpFromFunction(int port, O function) ctex { MyHTTPD server = new(port); server.serveFunction = function; server.start(); print("HTTP port " + port + " open"); ret server; }