If the server is not enabled what should I send?

mongoose.connect(...)
 .then(() => {
 app.listen(8000, () => {
 console.log('Server started on 8000');
});
 }).catch(() => {
????????????
 });


If the server is not enabled what should I send ?
April 3rd 20 at 17:31
2 answers
April 3rd 20 at 17:33
Well, it all depends on the external environment and the technical specifications.

In most cases, terminate with a fatal error.
Maybe wait a little and try to connect again.
Perhaps use a different communication address.
Perhaps some disaster to start in the app.
April 3rd 20 at 17:35
abuse in DC, like what am I paying for, and you sssssoooooo..... turned off the server.

Find more questions by tags MongoDBNode.js