Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix to handle new way that express 3 handles getting port. app.listen…

… now returns instance that was being relied upon.
  • Loading branch information...
commit a90efddf9fa5aba047831a8765d6188bb6c544ee 1 parent 5f36ea4
@shaunxcode authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 phantom.js
View
10 phantom.js
@@ -48,17 +48,17 @@
module.exports = {
create: function() {
- var app, args, cb, io, phantom, ps, server, _i;
+ var app, appServer, args, cb, io, phantom, ps, server, _i;
args = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++];
app = express.createServer();
app.use(express.static(__dirname));
- app.listen();
+ appServer = app.listen();
server = dnode();
phantom = null;
- ps = startPhantomProcess(app.address().port, args);
+ ps = startPhantomProcess(appServer.address().port, args);
ps.on('exit', function(code) {
var p;
- app.close();
+ appServer.close();
return phanta = (function() {
var _j, _len, _results;
_results = [];
@@ -73,7 +73,7 @@
log: null,
'client store expiration': 0
};
- return server.listen(app, {
+ return server.listen(appServer, {
io: io
}, function(obj, conn) {
phantom = conn.remote;
Please sign in to comment.
Something went wrong with that request. Please try again.