Sorry if this is a duplicate. I tried to find a similar question, but could not. Here's a breakdown:
I need to use the secret key with the package that I create, and I do not want to publish it, so I am trying to set it as a local bash environment variable. In my .bashrc file, I have the following:
MY_KEY="1111111111111111"
And then in my Gulpfile I have a task called "dev". For simplicity, suppose it looks like this:
gulp.task('dev', function () {
console.log(process.env.SECRET_KEY);
});
Then, to get the secret key in the environment, in my package.json package there is the following:
"scripts": {
"start": "SECRET_KEY=$MY_KEY gulp dev"
}
, , npm start, gulp undefined . SECRET_KEY=$MY_KEY gulp dev, gulp 1111111111111111. - npm start bash Node. ?