Skip to content

Instantly share code, notes, and snippets.

@dougluce
Last active December 16, 2015 03:59
Show Gist options
  • Save dougluce/5373400 to your computer and use it in GitHub Desktop.
Save dougluce/5373400 to your computer and use it in GitHub Desktop.
(changes to the boilerplate lib/server/index.js)
server = module.exports = http.createServer(expressApp);
server.listen = (function() {
var original_listen = server.listen;
return function(port, callback) {
original_listen(port, "10.144.119.121", callback);
}})();
Gives this error:
% node server.js
Master pid 6653
info - socket.io started
net.js:1057
self.once('listening', lastArg);
^
TypeError: Object #<Object> has no method 'once'
at Server.listen (net.js:1057:10)
at Server.derby.createStore.listen (/var/www/doug/src/web/lib/server/index.js:25:5)
at Object.run (/var/www/doug/src/web/node_modules/derby/lib/cluster.js:14:12)
at EventEmitter.run (/var/www/doug/src/web/node_modules/derby/lib/derby.server.js:36:16)
at Object.<anonymous> (/var/www/doug/src/web/server.js:1:84)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:903:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment