MCPcopy Index your code
hub / github.com/Unitech/pm2 / localStart

Function localStart

lib/API/Modules/NPM.js:40–61  ·  view source on GitHub ↗

* PM2 Module System. * Features: * - Installed modules are listed separately from user applications * - Always ON, a module is always up along PM2, to stop it, you need to uninstall it * - Install a runnable module from NPM/Github/HTTP (require a package.json only) * - Some modules add internal

(PM2, opts, cb)

Source from the content-addressed store, hash-verified

38 */
39
40function localStart(PM2, opts, cb) {
41 var proc_path = '',
42 cmd = '',
43 conf = {};
44
45 Common.printOut(cst.PREFIX_MSG_MOD + 'Installing local module in DEVELOPMENT MODE with WATCH auto restart');
46 proc_path = process.cwd();
47
48 cmd = path.join(proc_path, cst.DEFAULT_MODULE_JSON);
49
50 Common.extend(opts, {
51 cmd : cmd,
52 development_mode : true,
53 proc_path : proc_path
54 });
55
56 return StartModule(PM2, opts, function(err, dt) {
57 if (err) return cb(err);
58 Common.printOut(cst.PREFIX_MSG_MOD + 'Module successfully installed and launched');
59 return cb(null, dt);
60 });
61}
62
63function generateSample(app_name, cb) {
64 var rl = readline.createInterface({

Callers

nothing calls this directly

Calls 3

StartModuleFunction · 0.85
cbFunction · 0.85
cwdMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…