How to use the default function from pm2

Find comprehensive JavaScript pm2.default code examples handpicked from public code repositorys.

256
257
258
259
260
261
262
263
264
265
266


// server/servers/pm2Servers.ts
function pm2List(req, res) {
  return __async(this, null, function* () {
    try {
      import_pm2.default.list((error, list) => {
        defaultSucesshandler(res, list);
      });
    } catch (error) {
      defaultErrorHandler(res, error);
fork icon0
star icon0
watch icon1

+ 123 other calls in file

224
225
226
227
228
229
230
231
232
233
            }
        });
    });
}
function get_async_pm2() {
    var startfn = function (script, opts, cb) { return pm2_1.default.start(script, opts, cb); };
    var connectfn = function (noDaemonMode, cb) { return pm2_1.default.connect(noDaemonMode, cb); };
    var delfn = function (name, cb) { return pm2_1.default.delete(name, cb); };
    var listfn = function (cb) { return pm2_1.default.list(cb); };
    return {
fork icon0
star icon0
watch icon1

+ 35 other calls in file