Moved from Enmap/SQLite to MongoDB
This commit is contained in:
parent
7d1ca165b7
commit
606c1ea1dc
11 changed files with 214 additions and 112 deletions
|
@ -1,6 +1,11 @@
|
|||
// database stuff
|
||||
const Enmap = require("enmap");
|
||||
const settings = new Enmap({ name: "settings" });
|
||||
exports.settings = settings;
|
||||
const tags = new Enmap({ name: "tags" });
|
||||
exports.tags = tags;
|
||||
const mongoose = require("mongoose");
|
||||
const config = require("../config.json");
|
||||
mongoose.connect(config.mongoURL);
|
||||
const guildSchema = new mongoose.Schema({
|
||||
id: String,
|
||||
tags: Map,
|
||||
prefix: String
|
||||
});
|
||||
const Guild = mongoose.model("Guild", guildSchema);
|
||||
module.exports = Guild;
|
Loading…
Add table
Add a link
Reference in a new issue