tina4-nodejs 3.10.46 → 3.10.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tina4-nodejs",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.48",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Tina4 for Node.js/TypeScript — 54 built-in features, zero dependencies",
|
|
6
6
|
"keywords": ["tina4", "framework", "web", "api", "orm", "graphql", "websocket", "typescript"],
|
|
@@ -419,8 +419,9 @@ export async function startServer(config?: Tina4Config): Promise<{
|
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
// Cluster mode for production: fork workers based on CPU count
|
|
422
|
-
// Only when
|
|
423
|
-
|
|
422
|
+
// Only when --production is explicitly set (via TINA4_PRODUCTION env var)
|
|
423
|
+
const isProduction = (process.env.TINA4_PRODUCTION ?? "").toLowerCase() === "true";
|
|
424
|
+
if (cluster.isPrimary && isProduction) {
|
|
424
425
|
const numCPUs = os.cpus().length;
|
|
425
426
|
if (numCPUs > 1) {
|
|
426
427
|
const displayHost = host === "0.0.0.0" ? "localhost" : host;
|