Skip to content
This repository has been archived by the owner on Jul 14, 2019. It is now read-only.

Options is throwing an error #23

Open
JonTDev opened this issue Apr 29, 2018 · 0 comments
Open

Options is throwing an error #23

JonTDev opened this issue Apr 29, 2018 · 0 comments

Comments

@JonTDev
Copy link

JonTDev commented Apr 29, 2018

Sorry I am new to the git world, however I believe it requires I have permissions to create a branch.

So I forked it and ( https://github.com/JonTDev/mongoose-simpledb/blob/master/index.js )

Options is throwing an error due to the settings being passed at time of connection to the mongodb server.

( the server/replset/mongos options are deprecated, all their options are supported at the top level of the options object )

The error can be referenced on the Mongoose website.

http://mongoosejs.com/docs/connections.html
Can find mention of it @ header( Option Changes in v5.x )

You just call it from the root of the options being passed. So we needed to remove the server key.

Then socketOptions is also no longer an option. From what i can tell Mongoose changed it to socketTimeoutMS and keepAlive is now on its own.

Ending Results and successfully worked.

options: { socketTimeoutMS: 0, keepAlive: true, reconnectTries: 30 }

Thanks for the awesome class! It really did make my life a great deal easier, espically with referring of other collecitons. Made my life SUPER easier!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant