{MongoNetworkError: соединение 3 с cluster0-shard-00-02-z0urk.mongodb.net:27017 закрыто в TLSSocket.(/ home / fahad / Личная работа / Nodejs / Node js start / node_modules / mongoose / node_modules / mongodb-core / lib / connection / connection.js: 352: 9) в Object.onceWrapper (events.js: 276: 13)в TLSSocket.emit (events.js: 188: 13) в _handle.close (net.js: 610: 12) в TCP.done (_tls_wrap.js: 386: 7) имя: 'MongoNetworkError', errorLabels: ['TransientTransactionError'],
[Symbol (mongoErrorContextSymbol)]: {}}
module.exports = (app, express , mongoose, path, bodyParser) => {
app.use(express.static(path.resolve(__dirname, "../../dist")));
app.use(bodyParser.json());
mongoose.connect('mongodb+srv://fahad:123@cluster0-z0urk.mongodb.net/test?retryWrites=true', {useNewUrlParser: true})
.then(()=>console.log("DB server connect"))
.catch(e => console.log("DB error", e));
};