Registry / database / finup-mongo-library

finup-mongo-library

JSON →
library4.1.3jsnpmunverified

A MongoDB library for NestJS applications built on top of Mongoose. Version 4.1.3. Designed to simplify common MongoDB operations within NestJS projects. Differentiates by providing a thin wrapper around Mongoose with NestJS-specific patterns, but has minimal documentation.

npm install finup-mongo-library
INSTALL
IMPORT
SIG · FINUP-MONGO-LIBRAR
F
finup-mongo-library
databasejavascriptv4.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MongoModule
✓ import { MongoModule } from 'finup-mongo-library'
✗ const MongoModule = require('finup-mongo-library').MongoModule
ESM-only must use import syntax
MongoService
✓ import { MongoService } from 'finup-mongo-library'
✗ import MongoService from 'finup-mongo-library'
Named export, not default
MongoModuleOptions
✓ import { MongoModuleOptions } from 'finup-mongo-library'
Type export for configuration

Sets up MongoModule with connection URI and injects MongoService to access the database instance.

import { Module } from '@nestjs/common'; import { MongoModule } from 'finup-mongo-library'; @Module({ imports: [ MongoModule.forRoot({ uri: process.env.MONGO_URI ?? 'mongodb://localhost:27017/mydb', }), ], }) export class AppModule {} import { Injectable } from '@nestjs/common'; import { MongoService } from 'finup-mongo-library'; @Injectable() export class MyService { constructor(private readonly mongoService: MongoService) {} async getData() { const db = await this.mongoService.getDatabase(); return db.collection('test').find().toArray(); } }
Debug
Known issues
gotchaNo README or documentation provided; usage patterns may be inferred from code only.
fix
Refer to source or examples in the package repository.
affects: >=4.0.0
breakingVersion 4.x may have breaking changes from 3.x; imports and API might differ.
fix
Check changelog or migration guide if upgrading from 3.x.
affects: >=4.0.0 <5.0.0
gotchaThis package is a personal library with limited adoption; expect potential instability or lack of support.
fix
Consider using official NestJS Mongoose package (@nestjs/mongoose) for production.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'finup-mongo-library' or its corresponding type declarations.
Package not installed or types not configured.
fix
Run 'npm install finup-mongo-library' and ensure tsconfig includes node_modules types.
Cannot read properties of undefined (reading 'getDatabase')
MongoService not provided correctly or module not imported.
fix
Ensure MongoModule is imported in the root module and MongoService is injected via constructor.
Upgrade
Version history
4.1.3latest on npm
Audit
Dependencies
mongooserequiredCore MongoDB ODM dependency
@nestjs/commonrequiredNestJS decorators and module system
Agent activity
6 hits · last 30 days
node
6
Resources
finup-mongo-library — npm install finup-mongo-library · libregistry