Skip to content

Commit 23fff05

Browse files
committed
address comment: server main
1 parent 3a5d4c1 commit 23fff05

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import config from "./config.js";
88
import { Session } from "./session.js";
99
import { Server } from "./server.js";
1010

11-
async function main() {
11+
try {
1212
const session = new Session();
1313
const mcpServer = new McpServer({
1414
name: "MongoDB Atlas",
@@ -23,11 +23,6 @@ async function main() {
2323
const transport = new StdioServerTransport();
2424

2525
await server.connect(transport);
26-
}
27-
28-
// Start the server
29-
try {
30-
await main();
3126
} catch (error: unknown) {
3227
logger.emergency(mongoLogId(1_000_004), "server", `Fatal error running server: ${error as string}`);
3328
process.exit(1);

0 commit comments

Comments
 (0)