Chapter 2. Establishing a Database Connection
We are going to look at the two methods Mongoose uses to connect to databases, mongoose.connect
and createConnection
. We will also go through various configuration options.
By the end of this chapter, you will understand how to best use the different Mongoose connection methods to meet your needs. We will also have added a connection to the MongoosePM example project.