fix xcarve hostname on windows

This commit is contained in:
Todd Treece 2015-08-17 19:29:42 -04:00
parent 4f9093f403
commit 5aa8eca4ea
2 changed files with 4 additions and 5 deletions

7
cli
View file

@ -12,9 +12,8 @@ var command = process.platform === 'win32' ? 'forever.cmd' : 'forever';
function start() { function start() {
process.chdir(path.normalize(__dirname));
var child = spawn(command, ['start', '-c', 'node', 'index.js', '-s'], { var child = spawn(command, ['start', '-c', 'node', 'index.js', '-s'], {
cwd: __dirname,
env: process.env, env: process.env,
detached: true detached: true
}); });
@ -28,9 +27,8 @@ function start() {
function stop() { function stop() {
process.chdir(path.normalize(__dirname));
var child = spawn(command, ['stop', '-c', 'node', 'index.js', '-s'], { var child = spawn(command, ['stop', '-c', 'node', 'index.js', '-s'], {
cwd: __dirname,
env: process.env, env: process.env,
detached: true detached: true
}); });
@ -50,3 +48,4 @@ if (!process.argv.slice(2).length) {
cli.outputHelp(); cli.outputHelp();
} }
process.exit();

View file

@ -1,6 +1,6 @@
var util = require('util'), var util = require('util'),
httpProxy = require('http-proxy'), httpProxy = require('http-proxy'),
host = 'xcarve.local', host = (process.platform === 'win32' ? 'xcarve' : 'xcarve.local'),
port = 1338; port = 1338;
var server = httpProxy.createServer({ var server = httpProxy.createServer({