Permalink
Browse files

fixing typos

  • Loading branch information...
1 parent 33d2bdd commit e5b2d9917cf3cbecda2b06e0ab09a264ca574f0a @teknopaul committed Jul 15, 2011
Showing with 13 additions and 5 deletions.
  1. +13 −5 README
View
18 README
@@ -1,9 +1,13 @@
-ServletsFilter style reques chaining.
+ServletsFilter style request chaining.
-This is very simple single file modeul but provides a nice structure for webapps allowing you to introduce configurable aspects to each requires.
+This is very simple single file module, but provides a nice structure for webapps allowing you to introduce configurable aspects to each request.
The chain is configured in code, you can externalize it if you need.
+Usage:
+
+First load a set of filters
+
var attributesFilter = require("../server/attributes-filter"),
logRequestFilter = require("../server/log-request-filter")
serverHeaderFilter = require("../server/server-header-filter"),
@@ -23,7 +27,7 @@ var chainModules = [
var chain = new FilterChain(chainModules);
-Then ins a server start the chain with its execute() method, passing the request and response.
+Then, in a server start, the chain with it's execute() method, passing the request and response.
http.createServer(function(request, response) {
@@ -35,10 +39,10 @@ http.createServer(function(request, response) {
}).listen(8000);
-
-Filters look identical to Java Servlets filters
+That's it, nothing special, but a usefull design pattern.
+Filters look identical to Java Servlets filters.
var parse = require('url').parse;
@@ -52,3 +56,7 @@ filter = function(request, response, chain) {
};
exports.filter = filter;
+
+You must export a function called "filter", but the module can do any thing else as well.
+
+

0 comments on commit e5b2d99

Please sign in to comment.