This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Releases: ConjureLabs/route
Releases · ConjureLabs/route
2.0.0-rc2
2.0.0-rc1
1.2.0
1.1.0
Features
Direct function exports
When using crawSync
you can now export functions directly.
module.exports = (req, res) => res.send('works')
Or an array of handlers
const handlers = []
handlers.push((req, res, next) => {
req.asdf = 123
next()
})
handlers.push((req, res) => {
res.send(req.asdf) // '123'
})
module.exports = handlers
Resolved configuration jsons
Another feature added to syncCrawl
is support for saving route configs in .json
files, which are resolved as files as crawled.
.
└── routes
├─── routes.json # { a: 123 }
├─── account # resolves { a: 123 }
│ ├── routes.json # { b: 456 }
│ ├── get.js # resolves { a: 123, b: 456 }
└── get.js # resolves { a: 123 }
Inline config (direct in a Route
constructor) overrides any resolved values.
Patches
- bumped dependencies
- some general housekeeping
- restricting node engine to
12.x.x
- added an examples directory