Created
December 13, 2010 10:05
-
-
Save nbqx/738857 to your computer and use it in GitHub Desktop.
build and run ios simulator via node.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var spawn = require('child_process').spawn; | |
var server = http.createServer(function(req,res){ | |
res.writeHead(200, {'Content-Type':'text/plain'}); | |
var doing = spawn("/Library/Application\ Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py", ["run", __dirname]); | |
doing.stdout.on('data', function(data){ | |
res.write(data); | |
console.log(data.toString()); | |
}); | |
doing.stderr.on('data', function(data){ | |
res.write(data); | |
console.log(data.toString()); | |
}); | |
doing.on('exit', function(code){ | |
res.end('Bye!'); | |
}); | |
}); | |
server.listen(12345); | |
console.log('<Titanium Mobile Build Server>'); | |
console.log('working at 127.0.0.1:12345'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment