isnode-mod-cli
v0.0.9
Published
ISNode Command Line Interface (CLI) Module
Downloads
3
Readme
ISNode CLI (Command Line Interface) Module
Introduction
This is just a module for the ISNode Framework. To learn how to use the framework, we strongly suggest obtaining a copy of the Hello World example.
The CLI module is the first of the critical startup modules (as defined in application server configuration) to be loaded. It determines how the application server was started - based on whether it is a child process (therefore assuming that it is being initiated in daemon mode), and if not - then the command line parameters that were passed in to start the server.
CLI module specific system configuration exists under "cli" within the root of the system configuration. Currently one parameter is supported - "mode". This can be set to either "console" (forces the application to start in console mode regardless of command-line options passed in) or "daemon" (forces the application to start in daemon mode if not already running, or stops the daemon if it is already running, regardless of command-line options passed in). The mode attribute (or entire cli section) can be left out to have the command-line module run as described below. Example:
"cli": {
"mode": "console"
}
The following command-line parameters are supported. And this is effectively what is displayed in the console if someone attempts to initiate the application server without any parameters.
isnode-example-server v0.0.1
Usage: isnode-example-server [options]
Options:
start Starts the daemon server
start daemon Starts the daemon server
start console Starts a non-interactive console server (blocking)
stop Stops the daemon server
stop daemon Stops the daemon server
restart Restarts the daemon server
restart daemon Restarts the daemon server
status Shows the status of the daemon server
status daemon Shows the status of the daemon server
Methods
The CLI Module exposes no methods that can be used by other modules or services.