From 06dd6383d7a239817c2a9724465896ef7da70bc2 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 29 Jul 2021 16:00:22 -0400 Subject: Big changes --- plugins/mongo.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 plugins/mongo.js (limited to 'plugins') 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 -- cgit v1.2.3