aboutsummaryrefslogtreecommitdiff
path: root/plugins/mongo.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2021-07-29 16:00:22 -0400
committerAndrew Lee <alee14498@protonmail.com>2021-07-29 16:00:22 -0400
commit06dd6383d7a239817c2a9724465896ef7da70bc2 (patch)
tree8c5f63e6adc1a5cd47737d88e44fd7c76f325ea2 /plugins/mongo.js
parentffc85798c04897d1ddaed61a9be40e5bb0a8792f (diff)
downloadAleeBot-06dd6383d7a239817c2a9724465896ef7da70bc2.tar.gz
AleeBot-06dd6383d7a239817c2a9724465896ef7da70bc2.tar.bz2
AleeBot-06dd6383d7a239817c2a9724465896ef7da70bc2.zip
Big changes
Diffstat (limited to 'plugins/mongo.js')
-rw-r--r--plugins/mongo.js10
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