diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f64e93f2..0f4060e6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Removed the environment variable `ENABLE_FEATURE_CUSTOM_SYMBOLS` +- Changed the default `NODE_ENV` variable from `development` to `production` to avoid a requirement for self-hosted users to specify this value or receive `ENOENT: no such file or directory` error message on startup. ## 1.242.0 - 2023-03-04 diff --git a/apps/api/src/app/frontend.middleware.ts b/apps/api/src/app/frontend.middleware.ts index a43afa3f9..639c6bc3d 100644 --- a/apps/api/src/app/frontend.middleware.ts +++ b/apps/api/src/app/frontend.middleware.ts @@ -26,7 +26,7 @@ export class FrontendMiddleware implements NestMiddleware { ) { const NODE_ENV = this.configService.get<'development' | 'production'>('NODE_ENV') ?? - 'development'; + 'production'; this.isProduction = NODE_ENV === 'production'; diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index e53ade52c..81a33c231 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -12,7 +12,7 @@ async function bootstrap() { const NODE_ENV = configService.get<'development' | 'production'>('NODE_ENV') ?? - 'development'; + 'production'; const app = await NestFactory.create(AppModule, { logger: