You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
335 B
JavaScript

5 years ago
const config = require('./config')
const mongoose = require('mongoose')
mongoose.connect(config.mongodbURI, {
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: true,
dbName: config.mongodbName
})
mongoose.Promise = global.Promise
const Models = require('./models')
module.exports = { mongoose, Models }