pon-task-pm2

Pon task to use pm2

Usage no npm install needed!

<script type="module">
  import ponTaskPm2 from 'https://cdn.skypack.dev/pon-task-pm2';
</script>

README

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