Answer the question
In order to leave comments, you need to log in
How to do error handling for EJS so that the server does not crash?
If something went wrong in the ejs file, then the server crashes. Program node server.js exited with code 1
How to process it so that, for example, if an error occurs, then render another file and not kill the server?
Answer the question
In order to leave comments, you need to log in
try {
// что-то делаете
} catch (error) {
// обрабатываете ошибку
}
forever start server.js
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question