crew-management-mcp-server
Version:
Crew management server handling crew records, certifications, scheduling, payroll, and vessel assignments with ERP access for data extraction
15 lines • 432 B
JavaScript
import { MongoClient } from 'mongodb';
import { config } from './config.js';
import { logger } from './logger.js';
let client = null;
let db = null;
export async function getDatabase() {
if (!db) {
client = new MongoClient(config.mongoUri);
await client.connect();
db = client.db(config.mongoDbName);
logger.info('Connected to MongoDB');
}
return db;
}
//# sourceMappingURL=mongodb.js.map