This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed
Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const getApp = async (host?: string, port?: number) => {
2626 enableDebugMessages : true ,
2727 } ) ,
2828 ) ;
29-
29+
3030 cleanLogs ( ) ;
3131 const config = new DocumentBuilder ( )
3232 . setTitle ( 'Cortex API' )
Original file line number Diff line number Diff line change @@ -12,11 +12,10 @@ import { CortexUsecases } from './usecases/cortex/cortex.usecases';
1212 * Start the API server
1313 */
1414export async function start ( host ?: string , port ?: number ) {
15- const app = await getApp ( host , port ) ;
1615 // getting port from env
1716 const sHost = host || process . env . CORTEX_JS_HOST || defaultCortexJsHost ;
1817 const sPort = port || process . env . CORTEX_JS_PORT || defaultCortexJsPort ;
19-
18+ const app = await getApp ( sHost , Number ( sPort ) ) ;
2019 try {
2120 await app . listen ( sPort , sHost ) ;
2221 const cortexUsecases = await app . resolve ( CortexUsecases ) ;
Original file line number Diff line number Diff line change @@ -6,11 +6,10 @@ import { getApp } from './app';
66import chalk from 'chalk' ;
77
88async function bootstrap ( ) {
9- const app = await getApp ( ) ;
109 // getting port from env
1110 const host = process . env . CORTEX_JS_HOST || defaultCortexJsHost ;
1211 const port = process . env . CORTEX_JS_PORT || defaultCortexJsPort ;
13-
12+ const app = await getApp ( host , Number ( port ) ) ;
1413 try {
1514 await app . listen ( port , host ) ;
1615 console . log ( chalk . blue ( `Started server at http://${ host } :${ port } ` ) ) ;
You can’t perform that action at this time.
0 commit comments