1.4.0
In this release we:
- fix #141, #168.
- Offer
/dynamic/:routing/
- Move the
dev
server into the rollup config. For a faster and more predictable dev experience.
Full details: https://elderguide.com/tech/elderjs/#routes
Breaking Changes
Middleware Hook
To pull off dynamic routing we had to completely rework the routing model for Elder.js.
The only major breaking change has been to the signature of the middleware
hook, all of the props are now not mutable aside from request
and errors
.
That said, there should be no loss of control as compared to before. Simply return mutated request
object before the elderExpressLikeMiddleware
hook.
As long as the request is well formed, Elder.js will take care of it.
Dev Server
Prior to this release, Elder.js recommended two terminals during development. Now we recommend your scripts
section of your package.json
to look something like this:
"scripts": {
"start": "npm run dev",
"build": "node ./src/cleanPublic.js && npm run build:rollup && npm run build:html",
"build:rollup": "rollup -c",
"build:html": "node ./src/build.js",
"dev": "rollup -c -w --no-watch.clearScreen",
"serve": "node ./src/cleanPublic.js && npm run build:rollup && NODE_ENV=production node ./src/server.js"
}
Resulting in using `npm start` or `npm run dev` to do local development.