Skip to content

Commit

Permalink
[dist test] Make linting against https://github.com/indexzero/styleguide
Browse files Browse the repository at this point in the history
 the "pretest".
  • Loading branch information
indexzero committed Dec 6, 2014
1 parent c5d7c82 commit 9fbfae5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions lib/http-server.js
Expand Up @@ -36,22 +36,26 @@ var HTTPServer = exports.HTTPServer = function (options) {
var serverOptions = {
before: (options.before || []).concat([
function (req, res) {
options.logFn && options.logFn(req, res);
if (options.logFn) {
options.logFn(req, res);
}

res.emit('next');
},
ecstatic({
root: this.root,
cache: this.cache,
showDir : this.showDir,
showDir: this.showDir,
autoIndex: this.autoIndex,
defaultExt: this.ext
})
]),
headers: this.headers || {}
};

if (options.https)
if (options.https) {
serverOptions.https = options.https;
}

this.server = union.createServer(serverOptions);
};
Expand Down
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -14,6 +14,7 @@
],
"scripts": {
"start": "node ./bin/http-server",
"pretest": "stylezero bin/ lib/ test",
"test": "vows --spec --isolate"
},
"contributors": [
Expand Down Expand Up @@ -63,7 +64,8 @@
},
"devDependencies": {
"vows": "0.7.x",
"request": "2.21.x"
"request": "2.21.x",
"stylezero": "2.1.1"
},
"bugs": {
"url": "https://github.com/nodeapps/http-server/issues"
Expand Down

0 comments on commit 9fbfae5

Please sign in to comment.