Skip to content

Commit

Permalink
fix: добавить process.exit(1); в ловца непойманых
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyKardashev committed Nov 17, 2023
1 parent f8bca66 commit f1a6875
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const limiter = require('./utils/limiter');
process.on('uncaughtException', (err, origin) => {
// eslint-disable-next-line no-console
console.log(`ОЙ ${origin} ${err.name} c текстом ${err.message} не была обработана. Сработал глобальный обработчик ошибок.`);
process.exit(1);
});

const { PORT = 3000, NODE_ENV, DB_URL = 'mongodb://127.0.0.1:27017/mestodb' } = process.env;
Expand Down

0 comments on commit f1a6875

Please sign in to comment.