Skip to content
Browse files

Merge pull request #1 from dotCypress/master

Bind to all interfaces option
  • Loading branch information...
2 parents 3c27230 + 987d093 commit ceb5a4bd27fbfc64fdd887003cc06bd4a019bc2e @pvorb committed
Showing with 14 additions and 4 deletions.
  1. +6 −2 README.md
  2. +8 −2 wup.js
View
8 README.md
@@ -16,10 +16,14 @@ That's it.
On the command line enter
- wup
+ wup [-all]
+
+Parameters:
+
+ -all : listen on all interfaces.
All files in the current working directory will become available at
-`http://localhost:8080/`.
+`http://localhost:8080/` or `http://<ip>:8080/`.
## License
View
10 wup.js
@@ -58,6 +58,12 @@ var server = http.createServer(function (req, resp) {
});
});
-server.listen(8080, '127.0.0.1');
+var arguments = process.argv.splice(2);
-console.log('Server running at http://localhost:8080/');
+if(arguments[0] === '-all' ){
+ server.listen(8080);
+ console.log('Server running at port 8080');
+}else{
+ server.listen(8080, '127.0.0.1');
+ console.log('Server running at http://localhost:8080/');
+}

0 comments on commit ceb5a4b

Please sign in to comment.
Something went wrong with that request. Please try again.