Skip to content

Commit 0a00170

Browse files
authored
Merge pull request #4141 from RedisInsight/be/bugfix/RI-6357-port-telemetry-fix
RI-6357 fix app start telemetry
2 parents 112d61a + 94b335b commit 0a00170

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

redisinsight/api/src/main.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ export default async function bootstrap(apiPort?: number): Promise<IApp> {
2929
await migrateHomeFolder() && await removeOldFolders();
3030
}
3131

32-
const { port, host } = serverConfig;
32+
if (apiPort) {
33+
serverConfig.port = apiPort;
34+
}
35+
3336
const logger = WinstonModule.createLogger(LOGGER_CONFIG);
3437

3538
const options: NestApplicationOptions = {
@@ -75,7 +78,9 @@ export default async function bootstrap(apiPort?: number): Promise<IApp> {
7578

7679
const logFileProvider = app.get(LogFileProvider);
7780

78-
await app.listen(apiPort || port, host);
81+
const { port, host } = serverConfig;
82+
83+
await app.listen(port, host);
7984
logger.log({
8085
message: `Server is running on http(s)://${host}:${port}`,
8186
context: 'bootstrap',

0 commit comments

Comments
 (0)