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

Commit 6ff748b

Browse files
committed
chore: remove chalk blue text
1 parent a07a5af commit 6ff748b

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
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: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
defaultCortexJsPort,
66
} from '@/infrastructure/constants/cortex';
77
import { getApp } from './app';
8-
import chalk from 'chalk';
98
import { CortexUsecases } from './usecases/cortex/cortex.usecases';
109

1110
/**
@@ -21,10 +20,8 @@ export async function start(host?: string, port?: number) {
2120
await app.listen(sPort, sHost);
2221
const cortexUsecases = await app.resolve(CortexUsecases);
2322
await cortexUsecases.startCortex();
24-
console.log(chalk.blue(`Started server at http://${sHost}:${sPort}`));
25-
console.log(
26-
chalk.blue(`API Playground available at http://${sHost}:${sPort}/api`),
27-
);
23+
console.log(`Started server at http://${sHost}:${sPort}`);
24+
console.log(`API Playground available at http://${sHost}:${sPort}/api`);
2825
} catch {
2926
console.error(`Failed to start server. Is port ${port} in use?`);
3027
}

cortex-js/src/infrastructure/commanders/cortex-command.commander.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class CortexCommand extends CommandRunner {
9191

9292
this.host = options?.address || configApiServerHost || defaultCortexJsHost;
9393
this.port = options?.port || configApiServerPort || defaultCortexJsPort;
94-
if(this.host === 'localhost') {
94+
if (this.host === 'localhost') {
9595
this.host = '127.0.0.1';
9696
}
9797
this.enginePort =
@@ -122,9 +122,7 @@ export class CortexCommand extends CommandRunner {
122122
const isServerOnline = await this.cortexUseCases.isAPIServerOnline();
123123
if (isServerOnline) {
124124
console.log(
125-
chalk.blue(
126-
`Server is already running at http://${this.configHost}:${this.configPort}. Please use 'cortex stop' to stop the server.`,
127-
),
125+
`Server is already running at http://${this.configHost}:${this.configPort}. Please use 'cortex stop' to stop the server.`,
128126
);
129127
process.exit(0);
130128
}

cortex-js/src/main.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
defaultCortexJsPort,
44
} from '@/infrastructure/constants/cortex';
55
import { getApp } from './app';
6-
import chalk from 'chalk';
76

87
process.title = 'Cortex API Server';
98

@@ -15,12 +14,10 @@ async function bootstrap() {
1514

1615
try {
1716
await app.listen(port, host);
18-
console.log(chalk.blue(`Started server at http://${host}:${port}`));
19-
console.log(
20-
chalk.blue(`API Playground available at http://${host}:${port}/api`),
21-
);
22-
} catch {
23-
console.error(`Failed to start server. Is port ${port} in use?`);
17+
console.log(`Started server at http://${host}:${port}`);
18+
console.log(`API Playground available at http://${host}:${port}/api`);
19+
} catch (error) {
20+
console.error(`Failed to start server. Is port ${port} in use? ${error}`);
2421
}
2522
}
2623

0 commit comments

Comments
 (0)