You might not be able to deploy and stage a Node.js application
if the command to start the application or package to parse environment
variables is not set up correctly.
To resolve the problem, complete one or both of the
following actions as necessary:
- Specify the command that is used to start the application in the package.json file or
in the manifest.yml file. For
example, in the package.json file, you can use
the following code:
In the manifest.yml file, you can use the following code:{ ... "scripts": { "start": "node app.js" } }applications: - name: testApp ... command: node app.js ... - Use the cf-env package
to parse the environment variables, instead of doing it manually.
For example, you can use the following code:
cfEnv = require("cf-env")
No comments:
Post a Comment