Go to file
Tjatse 3ec3ef802e v0.0.2 2014-12-16 17:40:23 +08:00
bin CLI 2014-12-16 13:49:55 +08:00
lib feature: shares TAIL logs and watching PM2 by sub-emitter 2014-12-16 17:40:06 +08:00
web fix: scroll event 2014-12-16 17:40:19 +08:00
.gitignore ignore 2014-12-16 13:49:47 +08:00
.npmignore ignore 2014-12-16 13:49:47 +08:00
LICENSE Initial commit 2014-12-12 16:31:50 +08:00
README.md fix typo 2014-12-16 14:01:29 +08:00
package.json v0.0.2 2014-12-16 17:40:23 +08:00

README.md

pm2-gui NPM version

An elegant web interface for Unitech/PM2.

In progress.

Guide

# Installation ``` $ npm install -g PM2-gui ``` # CLI ``` Usage: PM2-gui [cmd] [options]

Commands:

start [options] [port]  Launch the web server, port default by 8088
config                  show all configs
set <key> <value>       set config by key-value pairs
rm <key>                remove config by key

Options:

-h, --help     output usage information
-v, --version  output the version number

Basic Examples:

Start the web server, by default port (8088):
$ pm2-gui start

Start the web server, by specific port (8090):
$ pm2-gui start 8090

<a name="cli_web" />
## Run Web Interface
```bash
  Usage: start [options] [port]

  Options:

    -h, --help  output usage information
    --no-debug  hide stdout/stderr information
## Configs ```javascript { "refresh": 3000 "manipulation": true "PM2": "~/.PM2" } ```
  • refresh The heartbeat duration of monitor (backend), 5000 by default.
  • manupulation A value indicates whether the client has permission to restart/stop processes, true by default.
  • PM2 Root directory of Unitech/PM2, ~/.PM2 by default.
### Set Config Usage ```bash $ PM2-gui set ```

Example

$ PM2-gui set refresh 2000

Above command will set refresh to two second.

### Remove Config Usage ```bash $ PM2-gui rm ```

Example

$ PM2-gui rm refresh

Above command will remove refresh config and it will be set to 5000 by default.

# Feature - All the heartbeats (no matter **monitor** or **tail (logs)**) are automatic destroyed. - The `PM2` processes are watched by a FSWatcher ([chokidar](https://www.npmjs.org/package/chokidar)), but not manually polling. - Communicated with `PM2` through **RPC** socket directly, but not `PM2` programmatic API and no more **sub/sub-emitter** bullshit (consumes memory and CPU usage). - Socket.io between client and server. - Monitor CPU and Memory usage of server in a real-time. - Monitor `PM2` processes in a real-time. - Supports: process memory monitor, PM2 restart/stop. - Supports [ANSI color codes](#tail_logs) by [ansi-html](https://github.com/Tjatse/ansi-html). # Cautions - Web Interface is wrote by CSS3 && HTML5, so view it with the latest version of the browser (WebGL, Animation, WebSocket supports), e.g. Chrome, Safari and Firefox. - I've never test it on Internet Explorer / Windows. # UI/UX - Amazing and smooth animations. - High performance. Backend (without `--no-debug` option): Home Empty List Processes Describe Complete Information Tail Logs # TODO - [ ] Multiple operations. - [ ] Configured JSON files. - [ ] Memory and CPU usage gauge of each process. - [ ] Test on Windows (need environment). - [ ] Need feedback/test.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.