@vielhuber/wahelper 1.5.2 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +18 -14
- package/package.json +1 -1
package/README.MD
CHANGED
|
@@ -106,24 +106,28 @@ $wahelper->sendGroup(
|
|
|
106
106
|
# install pm2
|
|
107
107
|
npm install -g pm2
|
|
108
108
|
|
|
109
|
-
# start daemon
|
|
109
|
+
# start daemon (linux)
|
|
110
110
|
pm2 start npx --name wahelper-xxxxxxxxxxxx --cwd /var/www/wahelper -- wahelper-daemon --device xxxxxxxxxxxx
|
|
111
111
|
|
|
112
|
-
#
|
|
113
|
-
|
|
112
|
+
# start daemon (windows)
|
|
113
|
+
pm2 start node --name wahelper-xxxxxxxxxxxx --cwd "C:\path\to\project" -- node_modules/@vielhuber/wahelper/wahelper-daemon.js --device xxxxxxxxxxxx
|
|
114
|
+
|
|
115
|
+
## autostart (linux)
|
|
114
116
|
pm2 save
|
|
115
|
-
## linux
|
|
116
117
|
pm2 startup
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
|
|
119
|
+
## autostart (windows)
|
|
120
|
+
pm2 save
|
|
121
|
+
Windows Task Scheduler > Create Task > Triggers: At startup → Actions: Start a program → Program: "C:\Users\<user>\AppData\Roaming\npm\pm2.cmd", Arguments: "resurrect"
|
|
119
122
|
|
|
120
123
|
# more commands
|
|
121
|
-
pm2
|
|
122
|
-
pm2
|
|
123
|
-
pm2
|
|
124
|
-
pm2
|
|
125
|
-
pm2
|
|
126
|
-
pm2
|
|
127
|
-
pm2
|
|
128
|
-
pm2
|
|
124
|
+
pm2 unstartup # remove autostart
|
|
125
|
+
pm2 status # show status of all processes
|
|
126
|
+
pm2 resurrect # restore saved process list
|
|
127
|
+
pm2 save # save current process list for resurrect
|
|
128
|
+
pm2 start wahelper-xxxxxxxxxxxx # start a stopped process
|
|
129
|
+
pm2 stop wahelper-xxxxxxxxxxxx # stop a running process
|
|
130
|
+
pm2 restart wahelper-xxxxxxxxxxxx # restart a process
|
|
131
|
+
pm2 logs wahelper-xxxxxxxxxxxx # tail live logs
|
|
132
|
+
pm2 delete wahelper-xxxxxxxxxxxx # remove process
|
|
129
133
|
```
|