* 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)
| 38 | */ |
| 39 | |
| 40 | function 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 | |
| 63 | function generateSample(app_name, cb) { |
| 64 | var rl = readline.createInterface({ |
nothing calls this directly
no test coverage detected
searching dependent graphs…