I use custom node.js cartridge on openshift
How can i set NODE_PATH=. for app start in package.json ? Should i provide it in package.json like that :
"start": "NODE_PATH=. NODE_ENV=production node app.js"
var config = require('config');
I'm the author of openshift-cartridge-nodejs :-)
"start": "node app.js" in your
package.json should be just enough.
If you take a look at
bin/install, you'll see that
NODE_ENV is already set to
production by default in the cartridge setup script.
Also, I'm not sure what you're trying to achieve by setting
.. There's a single Node.js version installed.
If you're generally interested in how you can set custom environment variables in an OpenShift-deployed application, have a look at the docs here. Basically you'll have to use the
rhc command-line utility like this:
$ rhc env set <Variable>=<Value> <Variable2>=<Value2> -a App_Name