Set environment variables for Nodej.js
To set environment variables specify custom Chef JSON with required key/value pairs.
E.g.
{
"environment_variables": {
"NODE_ENV": "production"
},
"deploy": {
"bubbler": {
"environment_variables": {
"NODE_ENV": "production",
"ENV_1": "value_of_env_1",
"ENV_2": "value_of_env_2"
}
}
}
}
In JSON above first "environment_variables" sets environment variables for machine (user root). The section "environment_variables" under "deploy" specifying environment variables for Node.js process which will be hit with "monit restart app_name".