@keeex/pm2-status
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@keeex/pm2-status

Detect if the current process is running under PM2 and provide some settings from it.

This library provides three functions:

  • isPM2(): return true if running under PM2
  • getInstanceId(): return the identifier of the current instance, or undefined if not applicable.
  • isLogTimestamped(): return true if running under PM2 and log timestamp is enabled

Installation

Install from npmjs:

npm install @keeex/pm2-status

Usage

Import named functions from default export

import {isPM2} from "@keeex/pm2-status";

if (isPM2()) {
  console.log("Yep, under PM2");
}

Package Sidebar

Install

npm i @keeex/pm2-status

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.71 kB

Total Files

5

Last publish

Collaborators

  • keeex_jenkins
  • marc-keeex
  • cley_faye