|
|
||
|---|---|---|
| lib | ||
| screenshots | ||
| test | ||
| web | ||
| .gitignore | ||
| .npmignore | ||
| .travis.yml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| README.md | ||
| package.json | ||
| pm2-gui | ||
| pm2-gui.ini | ||
| pm2-gui.js | ||
README.md
pm2-gui

An elegant web & terminal interface for Unitech/PM2.
Compatible with PM2 v0.12.7+ If you wanna update to pm2-gui@latest, make sure you've read the change logs.
Guide
- Features
- Cautions
- Installation
- Usage
- Configuration
- Authorization
- UI/UX
- Serving apps locally with nginx and custom domain
Directly:
$ node pm2-gui.js <cmd> [options]
Programmable:
var pm2GUI = require('pm2-gui');
pm2GUI.startWebServer([ini_config_file]);
pm2GUI.startAgent([ini_config_file]);
pm2GUI.dashboard([ini_config_file]);
# Configuration
`pm2-gui/pm2-gui.ini`:
```ini
;
; Home directory of pm2.
;
pm2 = ~/.pm2
;
; The interval between communications of Monitor.
;
refresh = 5000
;
; Port of Web server and socket agent.
;
port = 8088
;
; A valud indicates whether run the pm2-gui damonized or not.
;
daemonize = false
[log] ; ; Log directory. ; dir = ./logs ; ; A value indicates whether display the [INFO], [ERROR].. prefixes before log message or not. ; prefix = true ; ; A value indicates whether display the local date string before log message or not. ; date = false ; ; Log level, one of debug, log, info, warn, error. ; level = log
[agent] ; ; This authorization will be used to authorize socket / web connections if it's set. ; ; authorization = AuTh ; ; A value indicates whether agent offline or not. ; ; offline = false [remotes] ; ; the dashboard and web server will use this section to connect remoting socket server ; server_name = [authorization@]host:port ; ; pm2@131 = AuTh@192.168.1.131:9002 ; pm2@172 = 192.168.1.172:9001
<a name="ui" />
# UI/UX
- Amazing and smooth animations.
- High performance.
Curses-like dashboard:

Backend (without `--no-debug` option):

Authorization

<a name="ss_home" />
Home

Processes

Describe Complete Information

CPU && Memory Usage

Tail Logs

<a name="serv" />
# Serving apps locally with nginx and custom domain
```ini
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream pm2-gui {
server 127.0.0.1:8000;
}
server {
listen 80;
server_name pm2-gui.dev;
#useless but can not get rid of.
root /path/to/pm2-gui/web/public;
try_files $uri/index.html $uri.html $uri @app;
# paths
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://pm2-gui;
}
# socket.io
location /socket.io {
proxy_pass http://pm2-gui;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
Test
$ npm 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.
