|  |  | @@ -16,38 +16,57 @@ var help = '#unkown list of commands... please refer dveloper documentation for | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | // nodeShellExec('echo', ['elxr'], { inherit : true}) //, {stdio: "inherit"} | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | var dbForLabel = function(label){ | 
		
	
		
			
			|  |  |  | var dbsForLabel = { | 
		
	
		
			
			|  |  |  | devmysql : 'mysql' | 
		
	
		
			
			|  |  |  | , development : 'mssql' | 
		
	
		
			
			|  |  |  | , production : 'mssql' | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | return dbsForLabel[label] || 'mysql' | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | var __runcmd = function(label){ | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | var op = { | 
		
	
		
			
			|  |  |  | 'h' : ()=>{ console.log(cli + ' ' + ver + ' ' + help); return '-h' } | 
		
	
		
			
			|  |  |  | , 'devmysql' : ()=>{ | 
		
	
		
			
			|  |  |  | , 'start' : (label)=>{ | 
		
	
		
			
			|  |  |  | console.log('Starting Elixir Server.'); | 
		
	
		
			
			|  |  |  | var env = Object.assign({}, process.env); // Shallow clone it. | 
		
	
		
			
			|  |  |  | // console.dir(env) | 
		
	
		
			
			|  |  |  | env.NODE_ENV = 'devmysql'; | 
		
	
		
			
			|  |  |  | env.DEBUG = 'loopback:connector:mysql' | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | env.NODE_ENV = label; | 
		
	
		
			
			|  |  |  | env.DEBUG = 'loopback:connector:' + dbForLabel(label) | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | nodeShellExec('node', ['--inspect=9228', 'sage-rw/server.js'], { | 
		
	
		
			
			|  |  |  | inherit : true, | 
		
	
		
			
			|  |  |  | shell: true, detached: true, | 
		
	
		
			
			|  |  |  | cwd : 'loopback', | 
		
	
		
			
			|  |  |  | env: env, | 
		
	
		
			
			|  |  |  | shell : true | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | nodeShellExec('node', ['sage-rw/server.js'], { | 
		
	
		
			
			|  |  |  | nodeShellExec('node', ['--inspect=9227', 'sage-r/server.js'], { | 
		
	
		
			
			|  |  |  | inherit : true, | 
		
	
		
			
			|  |  |  | shell: true, detached: true, | 
		
	
		
			
			|  |  |  | cwd : 'loopback', | 
		
	
		
			
			|  |  |  | env: env, | 
		
	
		
			
			|  |  |  | shell : true | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | // nodeShellExec('c:/Program Files/nodejs/node.exe', { inherit : true, cwd : '../loopback'}); | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | // nodeShellExec('pwd', { | 
		
	
		
			
			|  |  |  | //     inherit : true | 
		
	
		
			
			|  |  |  | //   , cwd : '../loopback' | 
		
	
		
			
			|  |  |  | //   , env : env | 
		
	
		
			
			|  |  |  | // nodeShellExec('node', ['--inspect=9226', ' bin/www'], { | 
		
	
		
			
			|  |  |  | //   inherit : true, | 
		
	
		
			
			|  |  |  | //   shell: true, detached: true, | 
		
	
		
			
			|  |  |  | //   cwd : 'qms/server', | 
		
	
		
			
			|  |  |  | //   env: env, | 
		
	
		
			
			|  |  |  | //   shell : true | 
		
	
		
			
			|  |  |  | // }) | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | // nodeShellExec('node', ['sage-rw/server.js'], { | 
		
	
		
			
			|  |  |  | //     inherit : true | 
		
	
		
			
			|  |  |  | //   , cwd : '../loopback' | 
		
	
		
			
			|  |  |  | //   , env : env | 
		
	
		
			
			|  |  |  | // }) //, {stdio: "inherit"} | 
		
	
		
			
			|  |  |  | nodeShellExec('ember', ['s'], { | 
		
	
		
			
			|  |  |  | inherit : true, | 
		
	
		
			
			|  |  |  | shell: true, detached: true, | 
		
	
		
			
			|  |  |  | cwd : 'qms/', | 
		
	
		
			
			|  |  |  | env: env, | 
		
	
		
			
			|  |  |  | shell : true | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | , 'g' : ()=>{ | 
		
	
		
			
			|  |  |  | if(processedArgs.h) { | 
		
	
	
		
			
			|  |  | @@ -84,7 +103,7 @@ var __runcmd = function(label){ | 
		
	
		
			
			|  |  |  | // }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | return op[label](); | 
		
	
		
			
			|  |  |  | return op[label] ? op[label]() : op['start'](label); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | // mysqldump --add-drop-table --no-data -u root -p db_name | grep 'DROP TABLE' ) > drop_all_tables.sql | 
		
	
	
		
			
			|  |  | @@ -93,7 +112,7 @@ var __runcmd = function(label){ | 
		
	
		
			
			|  |  |  | var mysql = '../xampp/mysql/bin/mysql' | 
		
	
		
			
			|  |  |  | var mysqldump = '../xampp/mysql/bin/mysqldump' | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | __runcmd(processedArgs.label || processedArgs._[0] || '-h'); | 
		
	
		
			
			|  |  |  | __runcmd(processedArgs.label || processedArgs._[0] || 'h'); | 
		
	
		
			
			|  |  |  | // nodeShellExec('git', ['status']); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | function nodeShellExec() { |