pagex

Dev tools

client-side router

SHOW HN2016

58points
27comments
#649of 2,264 in 2016
Top 29%of 2016 by points

How HN took it

RoastedHalf or more of the comments are critical

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 HN
    • 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

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 HN
    • How is this different from page.js?
      lcarlson on HN
    • Yeah 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 HN
    • 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
  • 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 HN
    • I think page.js supports middleware if you're looking for something to emulate. Basically chainring callbacks.
      lcarlson on HN
    • A 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 HN
    • Why .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 HN
    • Uh, 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
  • 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 HN
    • How 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

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/12302639)