jshttp / jshttp.github.io

https://jshttp.github.io/
MIT License
47 stars 3 forks source link

routes #30

Closed Raynos closed 9 years ago

Raynos commented 9 years ago

https://github.com/aaronblohowiak/routes.js

Routes is a really minimal router inspired by express.

I think it was literally broken out of express 3 years ago.

Fishrock123 commented 9 years ago

This isn't specifically an http thing, lets talk about this and routes-router when the extracted express router lands (to a yet to be announced place)?

Also #33

dougwilson commented 9 years ago

this would be something for pillarjs

Raynos commented 9 years ago

You'd still want something here in jshttp.

Even if it's just like https://github.com/pillarjs/pillarjs.github.io/issues/3

utilities around parsing req.url belong in jshttp.

jonathanong commented 9 years ago

Maybe we can say opinionated stuff like routing belongs in pillar, unopinionated stuff belong here

Raynos commented 9 years ago

Sure,

One of the things that I'm really scared to maintain is the string -> regexp mapping ( https://github.com/aaronblohowiak/routes.js/blob/master/index.js#L48-L70 ).

This feels like a high value, hard to test / maintain, unopinionated piece to share.

jonathanong commented 9 years ago

Haha that's what path-to-regexp is!

Fishrock123 commented 9 years ago

Maybe we can say opinionated stuff like routing belongs in pillar, unopinionated stuff belong here

Eh, not quite. Pillar won't be particularly opinionated (more than jshttp but..) either, mainly just higher-level, I think.

dougwilson commented 9 years ago

We're still hashing out the division :)