Ignore linting healthcheck & exclue in rate-limiting

This commit is contained in:
Reginald Bondoc
2022-12-12 19:11:44 +01:00
parent 1ea75eb840
commit bcd18ab0af
5 changed files with 29 additions and 26 deletions
+7 -2
View File
@@ -51,9 +51,10 @@ const connectWithRetry = () => {
console.log(e);
}, 5000);
});
return mongoose.connection;
};
connectWithRetry();
const dbConnection = connectWithRetry();
app.enable('trust proxy');
app.use(cookieParser());
@@ -97,7 +98,11 @@ const server = http.createServer(app);
const onSignal = () => {
console.log('Server is starting clean-up');
return Promise.all([
// your clean logic, like closing database connections
() => {
dbConnection.close(() => {
console.info('Database connection closed');
});
}
]);
};