Testing the compatibility of different routers with express
npm run start
will execute the tests and output the table. The tables below are just updated by copying and pasting the result.
Compatibility Tests
express | koa-router | koa-tree-router | find-my-way | server-router | trek-router | |
---|---|---|---|---|---|---|
router.route(path).all | true | false | false | false | false | false |
common methods (.get, .post, etc) | true | true | true | true | false | false |
router.use | true | true | false | false | false | false |
express.use(router) | true | false | false | false | false | false |
(req, res, next) => {} for middleware | true | false | false | true | false | true |
static routes | true | true | true | true | true | true |
router.param() | true | true | false | false | false | false |
route parameters | true | true | true | true | true | true |
duplicate routes | true | true | false | false | false | false |
multiple middlewares | true | true | true | false | false | false |
regex routes | true | true | false | false | false | false |
path-to-regex style routes | true | false | false | false | false | false |
wildcard (*) routes | true | true | false | true | true | true |
express 404 handler | true | false | false | true | false | false |
Other Tests
express | koa-router | koa-tree-router | find-my-way | server-router | trek-router | |
---|---|---|---|---|---|---|
order independent | false | false | false | true | true | true |