Permalink
Browse files

docs; auto open after starting static server

  • Loading branch information...
1 parent fd48a22 commit f5e20e7d1b7510b956b99264d5f756d02856d03a @aheckmann aheckmann committed Aug 2, 2013
Showing with 4 additions and 1 deletion.
  1. +1 −0 package.json
  2. +3 −1 static.js
View
1 package.json
@@ -25,6 +25,7 @@
, "promises-aplus-tests": ">= 1.0.2"
, "tbd": "0.6.4"
, "benchmark" : "1.0.0"
+ , "open": "0.0.3"
}
, "directories": { "lib": "./lib/mongoose" }
, "scripts": { "test": "make test" }
View
4 static.js
@@ -1,6 +1,7 @@
var static = require('node-static');
var server = new static.Server('.', { cache: 0 });
+var open = require('open')
require('http').createServer(function (req, res) {
if ('/favicon.ico' == req.url) {
@@ -21,4 +22,5 @@ require('http').createServer(function (req, res) {
req.resume();
}).listen(8088);
-console.error('now listening on localhost:8088');
+console.error('now listening on http://localhost:8088');
+open('http://localhost:8088');

0 comments on commit f5e20e7

Please sign in to comment.