Permalink
Browse files

Changed to allow connections from all hosts - and made it the default

  • Loading branch information...
1 parent 9852129 commit 290db6603e30f9f8ce70b8348b3239f35050310e @tifroz tifroz committed with jdub Jun 6, 2010
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/node-router.js
View
9 lib/node-router.js
@@ -263,12 +263,15 @@ exports.getServer = function getServer(logger) {
doRoute();
});
+
function listen(port, host) {
port = port || 8080;
- if (typeof port === 'number') {
- host = host || "127.0.0.1";
- }
+
+ if (typeof host === 'undefined' || host == '*')
+ host = null ;
+
+
server.listen(port, host);
if (typeof port === 'number') {
logger("node-router server instance at http://" + host + ":" + port + "/");

0 comments on commit 290db66

Please sign in to comment.