argo/argo-url-router — pull request #1 by mdobson (2013-09-11 12:36:39+00:00)
Title: Added a simple middleware to improve parsing out query and hash parameters

```javascript
if(argo) {
argo
.use(function(handle){
handle("request", {affinity:"hoist"}, function(env, next){
env.router = {};
var reqUrl = env.request.url;
var parsedReqUrl = url.parse(reqUrl, true);
env.request.url = parsedReqUrl.pathname;
if(parsedReqUrl.query) {
env.router.query = parsedReqUrl.query;
} else if(parsedReqUrl.hash) {
env.router.hash = parsedReqUrl.hash;
}
next(env);
});
});
}
```

Here is the simple middleware addition added to the argo-url-router. It essentially just uses the stock node url parser to pick out all the stuff we need. We don't even have to slice up the url afterwards because it gives us a cleaned up path in the `pathname