You might be in a situation where a colleague has published an application and has not committed the source in a repository so it's running all right, but you might not know exactly what's running
🙂
Here's one way to solve the issue:
Start by logging into cloud foundry using the command line.
Then navigate to the cloud foundry target organization and space using
cf target
Locate the application or hdi container for which you'd like the source code and execute:
cf app your_app_name --guid
040b4e07-8fd2-4294-ab84-5328e5b73891
|
Finally, use the guid of your application to download the sources into a .tgz
cf curl -X GET /v2/apps/your_app_guid/download --output your_app_name.droplet.tgz
|
And voila ! The tgz will contain the source code and possibly dependent libraries so you might want to delete the dependency folder such as node_modules.