make a callback for server run only when done

This commit is contained in:
Raphael Amorim 2015-03-26 22:10:02 -03:00
parent e9ef277147
commit 10c2205171
1 changed files with 3 additions and 2 deletions

View File

@ -59,6 +59,7 @@ var app = connect()
var portToUse = port || 8080;
var server = http.createServer(app);
server.listen(portToUse);
console.log('Open http://localhost:' + portToUse + '/react-native/index.html');
server.listen(portToUse, function(){
console.log('Open http://localhost:' + portToUse + '/react-native/index.html');
});
module.exports = server;