How do i find where the apparent root of an active node.js app is in private cloud?

Not applicable

So i need to write some stuff to the file system in my node.js application. At least i do for now. This might change later.

When i write to the execution directory (files would show up in the same dir as a node.js file running in normal node) i get no problems. When i try to target something directly in the file system by path i get a resource not found error.

I can eventually work out a solution - but the first thing I need to do is to see if everything is working... but I cannot find the file! where is the execution root of a node.js proxy in Apigee private cloud?

Solved Solved
1 3 221
1 ACCEPTED SOLUTION

Not applicable

Hi @Benjamin Goldman , the directory path gets created when ever you deploy your apiproxy with node.js script . You can deploy and then find the location .

It looks something like this

/opt/apigee4/var/log/apigee/message-processor/work/o/example/e/prod/a/vsfmoivs__1/node/organization/environment/api/testStreaming.js

View solution in original post

3 REPLIES 3

Not applicable

When i try to output it form Node.js with this: resp.end(message.toString()+'\n'+'dir: ' + __filename +'\n'); I get: dir: /organization/environment/api/MyFileName.js

But these are NOT real directories. How do I find these on my system?

Not applicable

Hi @Benjamin Goldman , the directory path gets created when ever you deploy your apiproxy with node.js script . You can deploy and then find the location .

It looks something like this

/opt/apigee4/var/log/apigee/message-processor/work/o/example/e/prod/a/vsfmoivs__1/node/organization/environment/api/testStreaming.js

Bingo. Not sure why Find was not taking me right there - but it wasnt. Thanks a TON - you just saved me a huge headache.