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

Options is throwing an error #23

@JonTDev

Description

@JonTDev

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions