Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mmis1000/pm2-2.x-rpc

dnode wrapper for pm2 2.x api
https://github.com/mmis1000/pm2-2.x-rpc

Last synced: about 2 months ago
JSON representation

dnode wrapper for pm2 2.x api

Awesome Lists containing this project

README

        

# pm2-2.x-rpc

Dnode wrapper for `pm2` 2.x api

Usage:

```javascript
var dnode = require('dnode');
var Server = require('pm2-2.x-rpc').Server;

var server = new Server();
var client = dnode();

// pipe the stream through any transport
client.pipe(server).pipe(client);

client.on('remote', function (pm2) {
// got the pm2 instance
// use whatever pm2 api method
pm2.connect(function (err) {
assert.ok(!err);
})
})
```