-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Command Line Document
Pomelo includes various shell-like commands that help developers to build applications more convenient and more efficient. These commands support most of the normal application operations such as creating project, starting application, debugging application, stopping application, killing application, etc.
Use npm(node package manage tool) install pomelo and command line tool globally.
$:npm install pomelo -g
-
init: creates a new project that contains basic files with which can build pomelo-based applications.
-
start: launches the application and servers and it allows appending various parameters like –debug, --trace, --profile, --daemon to start the application in different mode.
-
list: lists the information of all servers that the application is running on, including server id, server type, pid, cpu, memory, and lanuch time.
-
stop: stops the application in all servers, unlike the kill command it terminal the program safely and gracefully.
-
kill: kills the application immediately, it may lead to bad influences like data loss, so we do not recommend using this command.
-
version: lists the current version of Pomelo.
-
help: lists all the commands currently supported by Pomelo.
$:pomelo init <dirname>
Create a new project under the path you give. If the path is not provided, the default path is current path, the default project name is current directory name; relative path is also supported.
$:pomelo start [development|production] [--daemon]
Users can launch the application in two modes, if not appointed, the default option is development. Users can add '--daemon' to run application in background; application run in front side by default。And users can add different start parameters in file servers.json.For example:
“connector”:[{"id":"connector-server-1", "host":"127.0.0.1", "port":4050, "wsPort":3050, "args":"--debug=[port], --trace, --prof, --gc"}]
The supported parameters can refer to the command line parameters of node.js and v8.The command must be used in root directory of the application.
notice: application run in daemon need to install forever, install command:
npm install forever -g
$:pomelo list
List all servers' information after the application started. The command must be used in root directory of the application.
$:pomelo stop
Close all servers and stop the application gracefully. The command must be used in root directory of the application.
$:pomelo kill
Close the application forcefully。The command must be used in root directory of the application.
$:pomelo version
List the current version of Pomelo.
$:pomelo help
lists all the commands currently supported by Pomelo.