[Pkg-javascript-commits] [node-static] 121/151: added '.resume()' to end of addListener because it's required for node 10.x+
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Tue Jan 7 23:18:03 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository node-static.
commit 8946c08d4dd6af0e340df04d276812c04d8804f9
Author: joshlangner <joshua.langner at gmail.com>
Date: Mon May 20 17:08:53 2013 -0300
added '.resume()' to end of addListener because it's required for node 10.x+
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 1db91f2..7a7b647 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ Synopsis
// Serve files!
//
file.serve(request, response);
- });
+ }).resume();
}).listen(8080);
API
@@ -60,7 +60,7 @@ the HTTP request and response object:
require('http').createServer(function (request, response) {
request.addListener('end', function () {
fileServer.serve(request, response);
- });
+ }).resume();
}).listen(8080);
### Serving specific files #
@@ -79,7 +79,7 @@ For example, you could serve an error page, when the initial request wasn't foun
fileServer.serveFile('/not-found.html', 404, {}, request, response);
}
});
- });
+ }).resume();
}).listen(8080);
More on intercepting errors bellow.
@@ -104,7 +104,7 @@ has been served successfully, or if there was an error serving the file:
response.end();
}
});
- });
+ }).resume();
}).listen(8080);
Note that if you pass a callback, and there is an error serving the file, node-static
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-static.git
More information about the Pkg-javascript-commits
mailing list