Comments (8)
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/115421377.
from nodejs-buildpack.
Hi @pkumar-appd thanks for reaching out. We'd like to help but want to make sure that we're not duplicating issue #41. Can you please explain how this question is different from that issue?
from nodejs-buildpack.
@Dannyzen Its different from previous query as now the extension is ready. Its written in python. The issue #41 was regarding which language needs to be selected for writing extension for nodejs BP.
from nodejs-buildpack.
Excellent. If the issue is solved, please close it. From what I understand you are attempting to obtain the value of an environmental variable. This use case is not Cloud Foundry specific and in the interest of exposing you to more helpful knowledge I'd like to refer you to the "Application Port" section of the node-tips document where the example provides sample syntax.
If this is not your question, please do let me know.
from nodejs-buildpack.
These are environment variables that are available at the runtime of your code are also available in your nodejs code.
In javascript,
var vcap_application = JSON.parse(process.env.VCAP_APPLICATION)
var vcap_services = JSON.parse(process.env.VCAP_SERVICES)
That way you don't need to write them to a file.
What makes you think that the environment variables are not persisted across the different scripts?
from nodejs-buildpack.
@jtarchie Thanks for the reply.
I am able to fetch the environment variables using python. I am also using JSON library.
But to make use of them currently i am writing a require statement in .js file in /tmp directory and then executing it before node server.js command.(A Start command of my application, mentioned in package.json)
The VCAP_SERVICES has appdynamics controller specific details (Eg: hostname, account-name, account-access-key etc)
But do we have any other way where i don't need to write these details into a file.
from nodejs-buildpack.
I'm not understanding where the disconnect is happening. You are asking about accessing environment variables. If you have a script that requires the data in VCAP_SERVICES
you read directly from the environment variable in that script. Instead of reading from a file, read from the environment variable, directly.
from nodejs-buildpack.
@jtarchie @Dannyzen Thanks for the help.
I am not longer storing the values of VCAP_SERVICES and VCAP_APPLICATION into /tmp dir.
from nodejs-buildpack.
Related Issues (20)
- BuildpackCompileFailed - Cf push sometimes fails on download go without an error message
- Release: nodejs-buildpack (Oct) HOT 1
- Weird no space left error when pushing nextjs app HOT 1
- nodejs_buildpack-v1_8_14 errors
- Deployment of native binary and node addon fails HOT 1
- Release: nodejs-buildpack (Nov) HOT 3
- Please keep nodejs 18.18.0 until bug in nodejs >= 18.18.2 is fixed (50263) HOT 1
- Go is downloaded multiple times HOT 2
- Release: nodejs-buildpack (Dec) HOT 1
- BOSH configured custom trusted certificate support
- Build pack fails on installing any new modules HOT 1
- Need a nginx buildpack with "stream_ssl_module" enabled
- Release: nodejs-buildpack (Jan) HOT 1
- Release: nodejs-buildpack (Feb) HOT 1
- Release: nodejs-buildpack (02-29) HOT 1
- Release: nodejs-buildpack (Mar)
- Release: nodejs-buildpack (03-14) HOT 1
- Release: nodejs-buildpack (03-28) HOT 1
- Release: nodejs-buildpack (04-11) HOT 1
- Release: nodejs-buildpack (04-25) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-buildpack.