Skip to content

Instantly share code, notes, and snippets.

@nbqx
Created December 13, 2010 10:05
Show Gist options
  • Save nbqx/738857 to your computer and use it in GitHub Desktop.
Save nbqx/738857 to your computer and use it in GitHub Desktop.
build and run ios simulator via node.js
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