Setting environment variables and using them in my Node.js app


Okay so within my Circle CI dashboard I have set these variables for my build:

So I try to access it within my Node.js app whilst running the build like so:
if(process.env.NODE_ENV === ‘si’) {
// Do some functionality only when building in Circle CI

This doesn’t appear to work, any idea why?


Try to echo $NODE_ENV from Bash to see if it’s defined as expected


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.