feat(cli): servers and workers in cluster mode (#13601)
* feat(cli): servers and workers in cluster mode * allow percentage
This commit is contained in:
committed by
GitHub
parent
cbfe0a4e95
commit
9d8ed70130
@@ -416,9 +416,19 @@ function buildLocalCommands(cli, isLocalProject) {
|
||||
: `Set port. Defaults to ${defaultPort}`,
|
||||
})
|
||||
.option(`cluster`, {
|
||||
type: `number`,
|
||||
type: `string`,
|
||||
describe:
|
||||
"Start the Node.js server in cluster mode. You can specify the number of cpus to use, which defaults to (env.CPUS)",
|
||||
"Start the Node.js server in cluster mode. Specify the number of CPUs to use or a percentage (e.g., 50%). Defaults to the number of available CPUs.",
|
||||
})
|
||||
.option("workers", {
|
||||
type: "string",
|
||||
default: "0",
|
||||
describe: "Number of worker processes in cluster mode or a percentage of cluster size (e.g., 25%).",
|
||||
})
|
||||
.option("servers", {
|
||||
type: "string",
|
||||
default: "0",
|
||||
describe: "Number of server processes in cluster mode or a percentage of cluster size (e.g., 25%).",
|
||||
}),
|
||||
handler: handlerP(
|
||||
getCommandHandler(`start`, (args, cmd) => {
|
||||
|
||||
Reference in New Issue
Block a user