I'm getting this error when I tried to host my logging bot on pterodactyl, but it works completely fine when I host it on my localhost or replit.
I'm using version 5.11.14 and it used to work fine.
const mongoose = require(`mongoose`);
const { db_pass } = require(`../../data/config.json`)
module.exports = {
init: () => {
const dbOptions = {
useNewURLParser: true,
useUnifiedTopology: true,
autoIndex: false,
poolSize: 5,
connectTimeoutMS: 10000,
family: 4
}
mongoose.connect(`mmy connection`, {
useUnifiedTopology: true,
useNewUrlParser: true
})
mongoose.set('useFindAndModify', false)
mongoose.Promise = global.Promise
mongoose.connection.on('connected', () => {
console.log("Connected to the database!")
})
mongoose.connection.on('disconnected', () => {
console.log("Disconnected from the database!")
})
mongoose.connection.on('err', (err) => {
console.log("Error on the db " + err)
})
}
}
The error:
