Skip to content

Commit 94b335b

Browse files
committed
RI-6357 refactor
1 parent 4cf463b commit 94b335b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

redisinsight/api/src/main.ts

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

32-
const { port, host } = serverConfig;
33-
34-
if (apiPort && apiPort !== port) {
32+
if (apiPort) {
3533
serverConfig.port = apiPort;
3634
}
3735

@@ -80,9 +78,11 @@ export default async function bootstrap(apiPort?: number): Promise<IApp> {
8078

8179
const logFileProvider = app.get(LogFileProvider);
8280

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

0 commit comments

Comments
 (0)