v0.1.1-alpha
Pre-releaseThis relese bring backports from 0.2.*
, bugfixe, minor features and documentation improvments.
It is still an alpha release and API breaks are expected for the next release. The final specifications is almost completed and should be stable in a few weeks.
The coverage passed from 53.04% to 55.19%, this is a 2.15% increase since the last release!
You can verify the release against this SHA1 checksum: fff3585e15c02cd44d963ce5a617f89c42f69133
Changeset
- renames
splice
tostream
inView
- removes
splice_async
fromView
- honors https scheme in FastCGI if
HTTPS
environment variable is set - provides HTTPVersion in
Request
- removes
handle_async
fromApplication
- fixes threading option and adds
--enable-threading
configuration option - implements a
next
continuation to keep routing - fixes the reference to the handler in
Route
- provides capability to bind a callback to multiple and all HTTP methods at once
Bind callback to multiple or all HTTP methods
Callback can be bound to multiple HTTP methods at once with methods
:
app.methods ({Request.GET, Request.POST}, "", (req, res, next) => {
// ...
});
Or all of them at once:
app.all ("", (req, res, next) => {
// ...
});
Next
It is now possible to keep routing with a continuation in a Route.Handler
.
app.get ("", (req, res, next) => {
next ();
});
app.get ("", (req, res) => {
// matched!
});
Outside the removal of the setup
signal, this change is completely backward-compatible and bring a wide range of new possibilities.
The signal was removed since it can be implemented using a catch-all route that just simply call next
.
router.all ("<any:path>", (req, res, next) => {
next ();
});
Remove async code
The async code in this release is not ready and will be deeply modified in 0.2.*
, so it is better for now not to go forward and keep a synchronous model.