I can't connect to my CF API from an application deployed


Amit Kumar Gupta
 

Hi Juan,

Is this question a duplicate of the other one?

Thanks,
Amit

On Mon, Aug 10, 2015 at 5:56 AM, Juan Antonio BreƱa Moral <
bren(a)juanantonio.info> wrote:

Hi,

This morning, I deployed a easy Node.js application using Express.
This application tries to connect with my api:

https://api.MY_IP.xip.io

but when I try to execute, the system returns an error:

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

When I test the project from localhost to the remote host with CF, the
code runs nice, but If I execute the code deployed in CF, I receive this
error. Does exist a CF variable similar to: process.env.VCAP_APP_PORT to
avoid this problem?

Juan Antonio