default to production

This commit is contained in:
William Welling
2021-12-20 15:29:04 -06:00
parent d59e8becc3
commit f75854b77b

View File

@@ -31,7 +31,8 @@ const getNumberFromString = (variable: string): number => {
};
const getEnvironment = (): Environment => {
let environment: Environment = 'development';
// default to production
let environment: Environment = 'production';
if (isNotEmpty(ENV('NODE_ENV'))) {
switch (ENV('NODE_ENV')) {
case 'prod':
@@ -43,6 +44,7 @@ const getEnvironment = (): Environment => {
break;
case 'dev':
case 'development':
environment = 'development';
break;
default:
console.warn(`Unknown NODE_ENV ${ENV('NODE_ENV')}. Defaulting to development`);