Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 1b4f902

Browse files
fix: correct swagger port (#980)
1 parent 44efcfe commit 1b4f902

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

cortex-js/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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')

cortex-js/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ import { CortexUsecases } from './usecases/cortex/cortex.usecases';
1212
* Start the API server
1313
*/
1414
export 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);

cortex-js/src/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ import { getApp } from './app';
66
import chalk from 'chalk';
77

88
async 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}`));

0 commit comments

Comments
 (0)