0.1.1 • Published 9 years ago

lark-PM v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

lark-pm

NPM version NPM downloads

Process manager of Lark Apps (or other node apps)

Install

$ npm install lark-PM

Get started

const pm = require('lark-PM');
const http = require('http');

/**
 * configure pm
 **/
/*
pm.configure({
  'background': false,
  'instances': 1,
  'log-file': 'logs/process_management.log',
  'daemon-dirname': __dirname,
});
*/

if (pm.isWorker) {
    http.createServer((req, res) => {
      res.write("Hello, " + process.pid + " is working for you");
      res.end();
    }).listen(3000);
}

then type node app.js, you'll get the app.js runing in foreground with one worker (and one master)

App status control

If you configure the pm with { background: true }, your app will be runing in background with forever.js

In this case, use the following commands to control your app

  • $ node app.js --lark-stop stop the app processes, including daemon, master and all workers
  • $ node app.js --lark-status show the app status

LICENCE

MIT

0.1.1

9 years ago

0.1.0

9 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago