Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions javascript/rest-api/part-1-web-server-basics/hr_app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ async function shutdown(e) {
}
}

process.on('SIGTERM', () => {
process.once('SIGTERM', () => {
console.log('Received SIGTERM');

shutdown();
});

process.on('SIGINT', () => {
process.once('SIGINT', () => {
console.log('Received SIGINT');

shutdown();
});

process.on('uncaughtException', err => {
process.once('uncaughtException', err => {
console.log('Uncaught exception');
console.error(err);

Expand Down
264 changes: 140 additions & 124 deletions javascript/rest-api/part-1-web-server-basics/hr_app/package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions javascript/rest-api/part-2-database-basics/hr_app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const dbConfig = require('./config/database.js');
const defaultThreadPoolSize = 4;

// Increase thread pool size by poolMax
// !!! Note: On Windows this won't have an effect. Instead the variable must be set before Node.js is started !!!
process.env.UV_THREADPOOL_SIZE = dbConfig.hrPool.poolMax + defaultThreadPoolSize;

async function startup() {
Expand Down Expand Up @@ -66,19 +67,19 @@ async function shutdown(e) {
}
}

process.on('SIGTERM', () => {
process.once('SIGTERM', () => {
console.log('Received SIGTERM');

shutdown();
});

process.on('SIGINT', () => {
process.once('SIGINT', () => {
console.log('Received SIGINT');

shutdown();
});

process.on('uncaughtException', err => {
process.once('uncaughtException', err => {
console.log('Uncaught exception');
console.error(err);

Expand Down
Loading