aboutsummaryrefslogtreecommitdiff
path: root/plugins/mongo.js
blob: 0102aabd6ba9e20a08fe6cd93ef46c673ec0a728 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
const mongoose = require('mongoose');
const { mongoPath } = require('../tokens.json');

module.exports = async () => {
    await mongoose.connect(mongoPath, {
        useNewUrlParser: true,
        useUnifiedTopology: true,
    });
    return mongoose;
}