import { ConfigService } from '@nestjs/config';
import { MongooseModuleOptions } from '@nestjs/mongoose';

export const createMongooseOptions = (configService: ConfigService): MongooseModuleOptions => ({
  uri: configService.get<string>('mongodb.uri', { infer: true }),
  autoIndex: true,
});
