Giter Site home page Giter Site logo

pmt's Introduction

PMT

PMT is a process manager for node.js.

Brief

  • PMT is still developing.
  • PMT haven't tested in windows.
  • Will release v1.0.0 when Stable.
  • Thanks for testing.
  • If you have any suggestions, please send email to [email protected] or create new issue.

Installation

$ npm install pmt -g

Example

See test/test.js and test/index.js to use pmt.

test.js

var pmt = require('pmt');

pmt.start({
    'name'         : 'myTitan',   // your app name
    'entrance'     : 'index.js',  // your app entrance js
    'worker_count' : 0,           // worker count, 0 for cpu count, default : 0
    'args'         : '--harmony', // your app args
    'max_momery'   : '128',       // worker max momery restart / MB, 0 for not based on max memory to restart,default : 0
    'auto_restart' : false        // auto restart if worker stopped or errored, default : false
},function (){
    pmt.disconnect();
});

index.js

var net = require('net');

var server = net.createServer(function(c) {
    c.write('hello world');
    c.end();
});
server.listen(8080);

node

$ node test.js

Command

$ npm install pmt --save      # for require
$ npm install pmt -g          # for easy CLI

$ pmt start [appName]/all     # start [appName]/all when stop
$ pmt stop [appName]/all      # stop [appName]/all
$ pmt kill                    # kill pmt daemon
$ pmt reboot                  # reboot pmt daemon
$ pmt restart [appName]/all   # restart [appName]/all
$ pmt grestart [appName]/all  # restart [appName]/all gracefully
$ pmt list                    # list all workers status
$ pmt monit                   # monit all workers status/cpu/monery
$ pmt logs                    # tail your app log
$ pmt daemonlogs              # tail pmt daemon log

Design document(Adding)

Pmt framework

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.