refactor use of NODE_ENV
We shouldn't be setting NODE_ENV in code.
We also shouldn't be reading NODE_ENV. Whenever we do if (env === 'whatever') we should be extracting that to a config value.
The problem with checking the environment directly is that when you have a new environment (e.g. staging) you have to go through all of your code adding it to the relevant conditions.
pubsweet-starter should follow the node convention of assuming development when NODE_ENV is undefined. In production the environment variable should be set to production globally.