Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated example and readme with a little bit more info

  • Loading branch information...
commit 9a530480310580a41e4cddd2b581d68d4a7a0d3c 1 parent 0256fd5
Andrew Cholakian andrewvc authored
Showing with 2 additions and 4 deletions.
  1. +2 −3 README.md
  2. +0 −1  example/basic.js
5 README.md
View
@@ -6,7 +6,7 @@ A node.js module for delivering static files.
## Features
- * Configurable callbacks on most eventslist
+ * Configurable callbacks on most events
* ETag / 304 Support
* Custom HTTP headers
@@ -43,7 +43,6 @@ Example from example/basic.js:
.otherwise(function(err) {
var statCode = 404;
res.writeHead(statCode, {'Content-Type': 'text/plain'});
- res.close("Not Found");
log(statCode, req.url, ip, err);
});
}).listen(PORT);
@@ -80,7 +79,7 @@ Fires after a file has been successfully delivered from the `webroot`. statCode
#### error(statCode,msg)
-Fires if there was an error delivering a file from the `webroot`. statCode contains the numeric HTTP status code that was sent to the clientmsg contains the error message.
+Fires if there was an error delivering a file from the `webroot`. statCode contains the numeric HTTP status code that was sent to the clientmsg contains the error message. You must close the connection yourself if the error callback fires!
#### otherwise()
1  example/basic.js
View
@@ -29,7 +29,6 @@ http.createServer(function(req, res) {
.otherwise(function(err) {
var statCode = 404;
res.writeHead(statCode, {'Content-Type': 'text/plain'});
- res.close("Not Found");
log(statCode, req.url, ip, err);
});
}).listen(PORT);
Please sign in to comment.
Something went wrong with that request. Please try again.