Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 544 Bytes

mongoose.md

File metadata and controls

27 lines (16 loc) · 544 Bytes

mongoose

Official MongoDB driver!

Installation

npm

npm install mongoose

yarn

yarn add mongoose

const mongoose =  require('mongoose')

module.exports  = mongoose.connect('mongodb+srv://<user>:<login>@<password>@cluster0-nfnvf.mongodb.net/<collectionName>?retryWrites=true&w=majority', {
	useNewUrlParser:  true,
	useUnifiedTopology:  true,
	useFindAndModify:  true

})

Ps: MongoDB Atlas is a global cloud database service that you can use to host your data. You have one free server to begin with.