docs: default connection

close #24
This commit is contained in:
Arash
2023-10-03 03:46:23 +03:00
committed by GitHub
parent 037920620e
commit e7c7beb8fd

View File

@ -54,7 +54,12 @@ This function creates a new Mongoose model with schema. Example usage:
| `hooks` | [`(schema: Schema<T>) => void`](https://mongoosejs.com/docs/middleware.html) | false | Schema Hooks Function to customize Model |
::alert
you can access the default connection with importing it from mongoose:
::
```
import { connection } from 'mongoose'
```
## `defineMongooseConnection`
This function creates a new Mongoose connection.