Skip to content

realglobe-Inc/pon-task-pm2

Repository files navigation

pon-task-pm2

Build Status npm Version JS Standard

Pon task to use pm2

Installation

$ npm install pon-task-pm2 --save

Usage

'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()

Signatures

define(filename, options) -> function

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 )

License

This software is released under the Apache-2.0 License.

Links

Releases

No releases published

Packages

No packages published