diff options
Diffstat (limited to 'plugins/mongo.js')
| -rw-r--r-- | plugins/mongo.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/mongo.js b/plugins/mongo.js new file mode 100644 index 0000000..0102aab --- /dev/null +++ b/plugins/mongo.js @@ -0,0 +1,10 @@ +const mongoose = require('mongoose'); +const { mongoPath } = require('../tokens.json'); + +module.exports = async () => { + await mongoose.connect(mongoPath, { + useNewUrlParser: true, + useUnifiedTopology: true, + }); + return mongoose; +}
\ No newline at end of file |
