In my node application, I'm trying to distinguish between my development version of the application and the production version. When I run webpack-dev-server, I use the following command:
NODE_ENV=development webpack-dev-server --inline --hot --content-base ./public
In my application, I try to read what is in NODE_ENV using process.env.NODE_ENV, but it seems to be null. Is this not the correct way to set environment variables when using webpack-dev-server?
Edit: This is in my React application. I use Express to serve the application in production, but I just use webpack-dev-server for development purposes.