Re: How to call Cloud Foundry API from a node.js application deployed?


Juan Antonio BreƱa Moral <bren at juanantonio.info...>
 

Good morning,

Yes I tried but the connection failed:

{"error":{"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}}

Later, I tryed with curl in the same host where I installed CF and I had success:

curl "https://api.MY_PUBLIC_IP.xip.io/v2/info" -X GET -k

{"name":"vcap","build":"2222","support":"http://support.cloudfoundry.com","version":2,"description":"Cloud Foundry sponsored by Pivotal","authorization_endpoint":"https://uaa.MY_PUBLIC_IP.xip.io","token_endpoint":"https://uaa.MY_PUBLIC_IP.xip.io","min_cli_version":null,"min_recommended_cli_version":null,"api_version":"2.25.0","logging_endpoint":"wss://loggregator.MY_PUBLIC_IP.xip.io:4443"}

Why from CURL, I can't connect and from the application is not possible?
I have to open some port in CF?

Juan Antonio

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.