arashsheyda / nuxt-mongoose

A Nuxt module for simplifying the use of Mongoose in your project.
https://docs.arashsheyda.me/nuxt-mongoose
69 stars 11 forks source link

[Qestion] Get connect and make a writeable stream #34

Closed maicss closed 7 months ago

maicss commented 7 months ago

I need write some log to my mongodb, so how to get the connect cursor and make a writeable stream for my logger service? Thanks advance!

maicss commented 7 months ago

Should I must use defineMongooseConnection to create a new connection ?

arashsheyda commented 7 months ago

@maicss you can use import { connection } from 'mongoose' to get the default connection, if you want to define a different connection you can use defineMongooseConnection