|
|
|
|
|
|
|
|
env.DEBUG = 'loopback:connector:' + dbForLabel(label) |
|
|
env.DEBUG = 'loopback:connector:' + dbForLabel(label) |
|
|
var cmd = env.NODE_ENV === 'development' ? 'nodemon' : 'node'; |
|
|
var cmd = env.NODE_ENV === 'development' ? 'nodemon' : 'node'; |
|
|
// cmd = 'node' |
|
|
// cmd = 'node' |
|
|
var childPromise = nodeShellExec(cmd, ['--inspect=9228', 'elixir/server.js'], { |
|
|
|
|
|
|
|
|
cmd = [cmd, ['--inspect=9228', 'elixir/server.js']] |
|
|
|
|
|
var childPromise = nodeShellExec(...cmd, { |
|
|
// inherit : true, |
|
|
// inherit : true, |
|
|
shell: true, |
|
|
shell: true, |
|
|
detached: true, |
|
|
detached: true, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var child = childPromise.process; |
|
|
var child = childPromise.process; |
|
|
if (typeof child.pid !== 'undefined') { |
|
|
if (typeof child.pid !== 'undefined') { |
|
|
|
|
|
console.log(`started Elixir Server PID(${child.pid}) : NODE_ENV=${process.NODE_ENV} ${cmd}`); |
|
|
fs.writeFileSync('.elixir-server.elixir.server.pid', child.pid, { |
|
|
fs.writeFileSync('.elixir-server.elixir.server.pid', child.pid, { |
|
|
encoding: 'utf8' |
|
|
encoding: 'utf8' |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// cwd : 'client/', |
|
|
// cwd : 'client/', |
|
|
// env: env |
|
|
// env: env |
|
|
// }) |
|
|
// }) |
|
|
var childPromise = nodeShellExec('ember', ['s'], { |
|
|
|
|
|
|
|
|
console.log('Starting Elixir Client Host.'); |
|
|
|
|
|
var cmd = ['ember', ['s']] |
|
|
|
|
|
var childPromise = nodeShellExec(...cmd, { |
|
|
// var childPromise = nodeShellExec('node', ['--inspect=9227', './node_modules/.bin/ember', 's'], { |
|
|
// var childPromise = nodeShellExec('node', ['--inspect=9227', './node_modules/.bin/ember', 's'], { |
|
|
// PB : TODO -- ember debugging. |
|
|
// PB : TODO -- ember debugging. |
|
|
// inherit : true, |
|
|
// inherit : true, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
child = childPromise.process; |
|
|
child = childPromise.process; |
|
|
if (typeof child.pid !== 'undefined') { |
|
|
if (typeof child.pid !== 'undefined') { |
|
|
|
|
|
console.log(`started Elixir Client Host PID(${child.pid}) : NODE_ENV=${process.NODE_ENV} ${cmd}`); |
|
|
fs.writeFileSync('.client.server.pid', child.pid, { |
|
|
fs.writeFileSync('.client.server.pid', child.pid, { |
|
|
encoding: 'utf8' |
|
|
encoding: 'utf8' |
|
|
}) |
|
|
}) |