Sean Fern

Results 22 comments of Sean Fern

I created pretty small static binaries for this need at https://github.com/gsf/yaml2json/releases.

-1 on query parsing. Agreed that it's not the router's job. +1 on exposing the parsed URL at req.parsedUrl since it has to be parsed already.

I don't like the look of beforeGet. Either include middleware in the server stack before passing control to your routes, affecting every request (but only acting on GETs, etc., as...

Also, regarding this query-parsing snippet, it lacks support for param arrays, alternative separator and assignment characters, and a maximum keys guard, all of which we can get in one line...

And (sorry for the barrage) parseQuery could of course only act on GETs: ``` javascript function parseQuery(req, res, next) { if (req.method == 'GET') { req.query = url.parse(req.url, true).query; }...

Support for hierarchical path namespacing reminds me of https://github.com/cloudhead/journey#paths -- are you thinking something along those lines? You could also achieve something like this with express-style route control passing: http://expressjs.com/guide.html#passing-route%20control.

Precedence on "first added, first processed" I could see being useful. I'm not sure I understand the precedence integer, and I get the sense that there would be a number...

Great. I'll get to it as soon as I clear a couple of things off my plate.

Do you feel strongly about semicolons? I'm happy to include them to match the style of choreographer.js but I've gotten quite used to not seeing them so much.

You got it.