Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tutv/pm2-master
PM2 is master
https://github.com/tutv/pm2-master
cluster ismaster master nodejs pm2 worker
Last synced: 12 days ago
JSON representation
PM2 is master
- Host: GitHub
- URL: https://github.com/tutv/pm2-master
- Owner: tutv
- Created: 2017-11-08T02:12:03.000Z (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-06-26T02:58:58.000Z (over 6 years ago)
- Last Synced: 2024-04-27T03:26:14.721Z (8 months ago)
- Topics: cluster, ismaster, master, nodejs, pm2, worker
- Language: JavaScript
- Homepage: https://goo.gl/okJy3o
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PM2 Master [![Travis branch](https://img.shields.io/travis/tutv/pm2-master/develop.svg)]() [![npm (tag)](https://img.shields.io/npm/v/pm2-master/latest.svg)]() [![GitHub issues](https://img.shields.io/github/issues/tutv/pm2-master.svg)]()
Check process is master when run with PM2
----
### Example
```javascript
const pm2Master = require('pm2-master');
if (pm2Master.isMaster()) {
console.log('master');
} else {
console.log('worker');
}```