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?


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


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


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


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