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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frameworks/TypeScript/nest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"mongodb": "3.5.4",
"mysql2": "2.1.0",
"pg": "8.5.1",
"physical-cpu-count": "^2.0.0",
"point-of-view": "3.7.2",
"reflect-metadata": "0.1.13",
"rimraf": "3.0.2",
Expand Down
5 changes: 3 additions & 2 deletions frameworks/TypeScript/nest/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { MongoModule } from './mongo/mongo.module';
import { join } from 'path';
import { SqlModule } from './sql/sql.module';
import cluster from 'cluster'
import physicalCpuCount from 'physical-cpu-count';
import os = require('os');

const port = process.env.PORT || 8080;

Expand Down Expand Up @@ -58,7 +58,8 @@ async function bootstrapFastify() {
}

if (cluster.isPrimary) {
for (let i = 0; i < physicalCpuCount; i++) {
const cpus = os.cpus().length;
for (let i = 0; i < cpus; i++) {
cluster.fork();
}

Expand Down