config.js
const configDB = {
dbHost: "localhost",
dbPort: "27017",
dbName: "discord-checkin",
dbPass: "123456",
};
const configDiscord = {
tokenBot: '<TOKEN BOT HERE>',
botName: 'YOU NAME BOT',
botId: 'YOU BOT ID',
};
index.js
// Database
mongoose.connect(`mongodb+srv://${configDB.dbHost}:${configDB.dbPass}@cluster0-coptech-bot-discord-rsv4f.mongodb.net/${configDB.dbName}?retryWrites=true&w=majority`, { useNewUrlParser: true, useUnifiedTopology: true});
mongoose.connect(`mongodb://${configDB.dbHost}:${configDB.dbPort}/${configDB.dbName}`, { useNewUrlParser: true, useUnifiedTopology: true })