# pmt

> a nodejs process manager package

Latest version **0.0.23** (published 2016-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install pmt
pnpm add pmt
yarn add pmt
bun add pmt
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.23 |
| Published | 2016-05-31 |
| First published | 2016-05-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | xuyanan |
| Maintainers | xuyanan5566 |
| Keywords | cli, process, manager, socket, pmt, nodejs, node-pmt, json, express, koa, pm2, forever, process manager, process monitor, cluster |

## Links

- npm: https://www.npmjs.com/package/pmt
- Repository: https://github.com/xnn5566/pmt
- Homepage: https://github.com/xnn5566/pmt#readme
- Issues: https://github.com/xnn5566/pmt/issues
- npm.io page: https://npm.io/package/pmt

## Dependencies (7)

- [async](https://npm.io/package/async.md) ^2.0.0-rc.5
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [charm](https://npm.io/package/charm.md) ^1.0.1
- [pidusage](https://npm.io/package/pidusage.md) ^1.0.1
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.1
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [eventemitter2](https://npm.io/package/eventemitter2.md) ^1.0.3

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.23 (latest) — 2016-05-31
- 0.0.22 — 2016-05-25
- 0.0.21 — 2016-05-24
- 0.0.20 — 2016-05-24
- 0.0.19 — 2016-05-24
- 0.0.18 — 2016-05-23
- 0.0.17 — 2016-05-20
- 0.0.16 — 2016-05-20
- 0.0.15 — 2016-05-19
- 0.0.14 — 2016-05-18
- 0.0.13 — 2016-05-18
- 0.0.12 — 2016-05-18
- 0.0.10 — 2016-05-18
- 0.0.8 — 2016-05-17
- 0.0.7 — 2016-05-17
- … 6 more at https://npm.io/package/pmt/versions

## README

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 277501642@qq.com or create new issue.


## Installation

```bash    
$ npm install pmt -g
```

## Example

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

### test.js

```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

```js
var net = require('net');

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

### node

```bash    
$ node test.js
```

## Command

```bash
$ 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](http://xuyanan.cn/2016/05/19/Pmt-%E6%9E%B6%E6%9E%84/)

## License

MIT

---
_Source: https://npm.io/package/pmt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
