Skip to content

tutv/pm2-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PM2 Master Travis branch npm (tag) GitHub issues

Check process is master when run with PM2


Example

const pm2Master = require('pm2-master');
if (pm2Master.isMaster()) {
    console.log('master');
} else {
    console.log('worker');
}