@invisible/mongoose
v1.2.1
Published
Additional functions for working with Mongoose
Downloads
11
Maintainers
Keywords
Readme
@invisible/mongoose
This module wraps mongoose
and exposes auxiliary methods.
Install
yarn add @invisible/mongoose
# or
npm install @invisible/mongoose
Usage
const {
mongoose,
initConnection,
} = require('@invisible/mongoose')
initConnection('mongodb://localhost/test') // initialize a mongoose connection.
const { Schema } = mongoose // you can use mongoose normally.
const schema = new Schema({})
const Model = mongoose.model('Model', schema)
License
MIT