JavaScript
Setting defaults

by Benny Neugebauer

let environment;
if (process.env.NODE_ENV) {
  environment = process.env.NODE_ENV;
} else {
  environment = 'development';
}

const environment = process.env.NODE_ENV || 'development';