Skip to content

Commit f5e20e7

Browse files
committed
docs; auto open after starting static server
1 parent fd48a22 commit f5e20e7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
, "promises-aplus-tests": ">= 1.0.2"
2626
, "tbd": "0.6.4"
2727
, "benchmark" : "1.0.0"
28+
, "open": "0.0.3"
2829
}
2930
, "directories": { "lib": "./lib/mongoose" }
3031
, "scripts": { "test": "make test" }

static.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
var static = require('node-static');
33
var server = new static.Server('.', { cache: 0 });
4+
var open = require('open')
45

56
require('http').createServer(function (req, res) {
67
if ('/favicon.ico' == req.url) {
@@ -21,4 +22,5 @@ require('http').createServer(function (req, res) {
2122
req.resume();
2223
}).listen(8088);
2324

24-
console.error('now listening on localhost:8088');
25+
console.error('now listening on http://localhost:8088');
26+
open('http://localhost:8088');

0 commit comments

Comments
 (0)