tuos-mongoose

1.0.3 • Public • Published

tuos-mongoose

Tuos mongoose plugin

INSTALL

NPM

npm install tuos-mongoose

YARN

yarn add tuos-mongoose

USAGE

Register the plugin

const options = {
	mongoose: {
		// default connection
		connect: 'mongodb://localhost:27017/tuos', // String or Object
		
		// default options
		options: { 
			useNewUrlParser: true, 
	    config: { 
	      autoIndex: true
	    },
	    useUnifiedTopology: true
		}
	}
}

fastify.register(require('tuos-mongoose'), options)

Access the mongoose instance

const mongoose = fastify.mongoose

Readme

Keywords

none

Package Sidebar

Install

npm i tuos-mongoose

Weekly Downloads

0

Version

1.0.3

License

Apache-2.0

Unpacked Size

13.8 kB

Total Files

6

Last publish

Collaborators

  • lighty262