mongodb, is used in node and listens to the service on the local port, which has been accessible normally until now, but has suddenly been inaccessible. Can"t find out what the problem is
// connect mongoose
mongoose.connect("mongodb://localhost/coursedesign")
.then(() => {
console.log("mongodb is connecting...");
})
.catch(err => {
console.log(err);
})
//
var port = 5000;
app.listen(port,() => {
console.log(`Server running on ${port}`);
})
Terminal displays normal startup
localhost
what went wrong? Solve