-
Notifications
You must be signed in to change notification settings - Fork 77
i_en_mydog_cli
huangjizhong edited this page Aug 27, 2022
·
3 revisions
-
mydog init
Initialize the project -
mydog start
Start the server -
mydog list
Server monitoring -
mydog stop
Shut down the server -
mydog remove
Shut down some servers -
mydog removeT
Shut down some server types -
mydog cmd
Generate the corresponding message number file according to route.ts -
mydog send
Send messages to the mydog framework
mydog start -d -e env [id1 id2 ...]
Execute this command in the project dist
directory. -d means running in the background, -e env is the setting environment, that is, the corresponding configuration in server.ts is selected. id1 id2 means the id of the server to be started. If it is not passed, all will be started. id1 id2 id3 can be abbreviated as id1~3.
mydog list -h host -p port -t cliToken -i 5
mydog monitoring console. -h is the master server host, -p is the master server port number, -t is the key, and -i is the monitoring data interval. Developers can customize the data as follows
app.setConfig("mydogList", () => {
return [{ "title": "cpu(%)", "value": getCpuUsage() }];
});
mydog stop
Shut down all servers.
mydog remove id1 [id2 ...]
Shut down id1 and id2 servers
mydog removeT serverType1 [serverType2 ...]
Shut down servers of serverType1 and serverType2
mydog cmd [ts cs ...]
Executing this command in the project src
directory will generate a corresponding message file based on the config/sys/route.ts
file:
-
config/cmd.ts
Server usage. When the server actively sends a message to the client, it uses the message number in this file. - Provide the function
mydog_cmd
in thesrc/mydog_cli.js
file, and you will receive the message ofmydog cmd
. Developers can generate the client prompt file they need according to the parameters.
mydog send [argv0 argv1 ...]
- You can simply send a message to the server.
- Provide the function
mydog_send
in the filesrc/mydog_cli.js
, you will receive the callback message ofmydog send
, and the developer can make corresponding operations according to the parameters.