From 8bd2f5c3c44c63cb30354103b76d09a89a27eec9 Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Fri, 14 Feb 2025 10:03:58 +0100 Subject: [PATCH] refactor(server): rename PORT to NODE_PORT (#10193) Updated the environment variable name from PORT to NODE_PORT for more clarity and alignment with node server conventions. Adjusted references in configuration and application bootstrap accordingly. Fix #10017 --- .../engine/core-modules/environment/environment-variables.ts | 4 ++-- packages/twenty-server/src/main.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts b/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts index 460880425..b4b7553c3 100644 --- a/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts +++ b/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts @@ -747,12 +747,12 @@ export class EnvironmentVariables { @EnvironmentVariablesMetadata({ group: EnvironmentVariablesGroup.ServerConfig, - description: 'Port for the backend server', + description: 'Port for the node server', }) @CastToPositiveNumber() @IsNumber() @IsOptional() - PORT = 3000; + NODE_PORT = 3000; @EnvironmentVariablesMetadata({ group: EnvironmentVariablesGroup.ServerConfig, diff --git a/packages/twenty-server/src/main.ts b/packages/twenty-server/src/main.ts index 81c16f7dc..f88451242 100644 --- a/packages/twenty-server/src/main.ts +++ b/packages/twenty-server/src/main.ts @@ -87,7 +87,7 @@ const bootstrap = async () => { // Inject the server url in the frontend page generateFrontConfig(); - await app.listen(environmentService.get('PORT')); + await app.listen(environmentService.get('NODE_PORT')); }; bootstrap();