S
S
Shakir Darion2019-12-11 17:55:12
MongoDB
Shakir Darion, 2019-12-11 17:55:12

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 ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2019-12-11
@VladimirAndreev

Well, it all depends on the external environment and technical specifications.
In most cases, terminate with a fatal error.
Maybe wait a bit and try to connect again.
Perhaps use a different connection address.
Perhaps there are some other ways to crash start in the application.

V
Valentin Gorulko, 2019-12-11
@serggool80

abuse in the DC, like what I'm paying for, and you sssssuuuuuu ..... turned off the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question