Skip to content

Node.js based forum software built for the modern web

hmm node 20, yummy

Barış Soner Uşaklı49bdb455eb91
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index c97b7fb8da..80e8d4e1ed 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -5,12 +5,10 @@ on:
branches:
- master
- develop
- - bootstrap5
pull_request:
branches:
- master
- develop
- - bootstrap5
defaults:
run:
@@ -29,19 +27,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
- node: [16, 18]
+ node: [16, 18, 20]
database: [mongo-dev, mongo, redis, postgres]
include:
# only run coverage once
- os: ubuntu-latest
- node: 16
+ node: 18
coverage: true
# test under development once
- database: mongo-dev
test_env: development
# only run eslint once
- os: ubuntu-latest
- node: 16
+ node: 18
database: mongo-dev
lint: true
runs-on: ${{ matrix.os }}
diff --git a/src/start.js b/src/start.js
index f87f0b4ddf..94a785bcc7 100644
--- a/src/start.js
+++ b/src/start.js
@@ -95,8 +95,9 @@ function printStartupInfo() {
}
function addProcessHandlers() {
- process.on('SIGTERM', shutdown);
- process.on('SIGINT', shutdown);
+ ['SIGTERM', 'SIGINT', 'SIGQUIT'].forEach((signal) => {
+ process.on(signal, () => shutdown());
+ });
process.on('SIGHUP', restart);
process.on('uncaughtException', (err) => {
winston.error(err.stack);
@@ -130,7 +131,7 @@ function restart() {
}
async function shutdown(code) {
- winston.info('[app] Shutdown (SIGTERM/SIGINT) Initialised.');
+ winston.info('[app] Shutdown (SIGTERM/SIGINT/SIGQUIT) Initialised.');
try {
await require('./webserver').destroy();
winston.info('[app] Web server closed to connections.');
@@ -142,6 +143,7 @@ async function shutdown(code) {
process.exit(code || 0);
} catch (err) {
winston.error(err.stack);
+
return process.exit(code || 0);
}
}