← All procedures
server.stop
Stop running CLI server
CLI- Package
- @procedures/peer · README
- Path
["server","stop"]- CLI
mark server stop- As data
{"$proc":["server","stop"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/peer"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["server","stop"], {});
console.log(JSON.stringify(result));From the command line
$ mark server stop
As data, in a program
{ "$proc": ["server", "stop"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
port | integer | no | | The port of the server to stop (default: all servers) |
force | boolean | no | | Stop with SIGKILL instead of SIGTERM |
Output
| Field | Type | Required | Default | Description |
|---|
success | boolean | yes | | True when the server stopped |
message | string | yes | | A message about the result |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"port": {
"description": "The port of the server to stop (default: all servers)",
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"force": {
"description": "Stop with SIGKILL instead of SIGTERM",
"type": "boolean"
}
}
},
"output": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "True when the server stopped"
},
"message": {
"type": "string",
"description": "A message about the result"
}
},
"required": [
"success",
"message"
],
"additionalProperties": {}
}
}