Skip to content

Embrace the freedom to use mongodb on nest without necessarily resorting to mongoose 🍃

License

Notifications You must be signed in to change notification settings

GoleeTeam/mongo-nest

Repository files navigation

Mongo Nest

Embrace the freedom to use mongodb on nest without necessarily resorting to mongoose 🍃

Installation

npm install @golee/mongo-nest

pnpm add @golee/mongo-nest

Usage

// app.module.ts

@Module({
    imports: [MongoModule.forRoot({uri: 'mongodb://localhost:27017'})],
    controllers: [],
    providers: [],
})
export class AppModule implements NestModule {
}

// app.service.ts
@Injectable()
export class AppService {
    constructor(@InjectMongo() public readonly mongoClient: MongoClient) {
    }
}

About

Embrace the freedom to use mongodb on nest without necessarily resorting to mongoose 🍃

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published