pagex
Dev tools
client-side router
SHOW HN2016
How HN took it
2 positive, 4 neutral or asking, 0 mixed, 10 critical, out of 16 comments about the project. Thread score -0.38.
Idea: 0 for, 6 againstDesign: 2 for, 1 againstExecution: 0 for, 2 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Ergonomic API; parameters passed to callbacks
From 2 comments
It was initially a Regex-only project so it was quite different. Then I added path-to-regex and forgot to check if there was some library out there similar so now they are quite…
franciscop on HNQuick tip, instead of passing true here, having an options object improves readability. As somebody who's never seen it before, the following does the opposite of what I expect:…
JasonSage on HN
Objections
Too similar to page.js
From 3 comments
Looks good, but isn't it the as existing https://visionmedia.github.io/page.js/ ?
yev on HNHow is this different from page.js?
lcarlson on HNYeah looks exactly like page.js
longlho on HN
Solves a problem client-side routers already solved
From 1 comment
Hmm not sure what problem this was trying to solve since client side router has been a solved one for a long time. And this is not looking close to express w/o middleware, which…
longlho on HN
No middleware support, so not really express-like
From 2 comments
Uh, then you and I have very different definitions of "express-like". When I think of express I think of middleware.
gberger on HNHmm not sure what problem this was trying to solve since client side router has been a solved one for a long time. And this is not looking close to express w/o middleware, which…
longlho on HN
Possible ReDoS from regex routes
From 1 comment
I'm watching a movie so I haven't looked too deeply at this, but your regexes aren't safe from ReDoS according to substack's safe-regex [1]. It might be worth finding a…
micaksica on HN
Requests
Middleware support
From 3 comments
Do you plan to support middlewares?
urvader on HNI think page.js supports middleware if you're looking for something to emulate. Basically chainring callbacks.
lcarlson on HNA callback is middleware, you can ``` page('/some/path', middleware, callback); ```
reaktivo on HN
Options object instead of boolean negate flag
From 1 comment
Quick tip, instead of passing true here, having an options object improves readability. As somebody who's never seen it before, the following does the opposite of what I expect:…
JasonSage on HN
Nested route namespaces like express routers
From 2 comments
One powerful feature of the Express router (but missing here) is that it's just a middleware, making composition trivial, e.g.: ``` const userRouter = router() .get('/',…
olalonde on HNWhy .namespace and not .use like express?
kevinsimper on HN
Questions
Why is it called express-like?
From 2 comments
I don't understand the "express-like" in the title. What's similar to express in your router?
jspdown on HNUh, then you and I have very different definitions of "express-like". When I think of express I think of middleware.
gberger on HN
How is it different from page.js?
From 1 comment
How is this different from page.js?
lcarlson on HN
Can user input be a risk given client-side execution?
From 1 comment
Isn't this client-side? So, what could a malicious user DoS other than their own browser? Am I missing something?
SwellJoe on HN
Alternatives named
page.js
From 2 comments
Looks good, but isn't it the as existing https://visionmedia.github.io/page.js/ ?
yev on HNHow is this different from page.js?
lcarlson on HN
Express router
From 1 comment
One powerful feature of the Express router (but missing here) is that it's just a middleware, making composition trivial, e.g.: ``` const userRouter = router() .get('/',…
olalonde on HN