Pon task to use pm2
$ npm install pon-task-pm2 --save
'use strict'
const pon = require('pon')
const ponTaskPm2 = require('pon-task-pm2')
async function tryExample () {
let run = pon({
// Define pm2 task
pm2: ponTaskPm2(),
// Register shortcuts
start: 'pm2/start',
restart: 'pm2/restart',
stop: 'pm2/stop'
})
run('start')
}
tryExample()
Define task
Param | type | Description |
---|---|---|
filename | string | Script file path |
options | Object | Optional settings |
options.waitReady | boolean | Wait to ready ( https://github.com/Unitech/pm2/tree/master/examples/wait-ready ) |
This software is released under the Apache-2.0 License.