Reputation: 325
I have tried figure out how set my NODE_ENV in nestjs according what i am doing, if run start in my local i expect NODE_ENV=development but if i run integration test then NODE_ENV=test. whats the best approach y pretend use cross-env and each npm run command use cross-env e.g "start:dev": "cross-env NODE_ENV=development node index.js" and so on, i want to know what do you think and your experience.
Upvotes: 0
Views: 402
Reputation: 303
I honestly don't fully understand the question, but the way I set the environment variables (that is for node.js without nestjs on the IBM Cloud) is the following:
cf set-env ${CF_APP} NODE_ENV test
cf restage
Does this answer your question somehow?
Upvotes: 0