Hi,
I have installed private cloud (AIO). If I want to create a node.js proxy, do I need to install node.js on the AIO machine, or should it already be there?
Thanks, Sam
It's already there. You'll see Node.js API Proxy when creating a new proxy from the UI. You can try the hello world version to verify.
Thanks for the advice Diego.
It seems that the script is not being executed on the private cloud.
This is the reverse-ip-address proxy.
In the cloud it works fine, and in the Trace, at the Execution step, i see this:
On the private cloud (on-prem) running the same proxy, i see this in the Trace:
So it seems that the script is not being executed properly.
The script makes an outbound call to api.ipify.org to get the IP address, so maybe thats not working? The script is this:
// reverse-ip-address var http = require("http"); var ipAddress = ""; var options = {host: "api.ipify.org", path: "/"}; var callback = function(response) { response.on("data", function(data) { ipAddress = data.toString(); console.log("IP Address: " + ipAddress); }); } http.request(options, callback).end(); var server = http.createServer(function(request, response) { response.setHeader("X-Node-Content-IP", ipAddress); response.end(ipAddress.split(".").reverse().join().replace(/,/g, '.')); }); server.listen(9000, function() { });
In both cases I don't see anything when I click the 'Node.js Logs' button. Not sure how to troubleshoot this?
Thanks, Sam