mongoose-handler-nt
v1.1.5
Published
Simple handler for Mongoose connection
Downloads
5
Readme
MongooseHandler
This module handles a simple connection with Mongoose to a MongoDB server.
Installation
$ npm install mongoose-handler-nt --save
Usage
- connect(config)
Example of config
{
"HOST": "127.0.0.1",
"PORT": "27017",
"DB_NAME": "DATABASE",
"USERNAME": "USERNAME",
"PASSWORD": "PASSWORD",
"PARAMS": "?ssl=true"
}
- connectWithString(connectionString)
The connectionString must be in the MongoDB format [https://docs.mongodb.com/manual/reference/connection-string/].
Then, you just need to insert mongoose in the files that will use it.