v0.1.2-alpha
Pre-release
Pre-release
This is probably the last release of the 0.1
series as the 0.2
branch is almost ready to be merged in the trunk.
This release introduce fixes and two features: null
rules and status code handling.
You can verify the release against this SHA-1 checksum: c564e37ff1934470669789853b9db04d4ae6d8b0
Changeset
- avoids a useless traversal when constructing the
Accept
header - suffixes callback delegates with
Callback
- status handling
null
can be used as a rule to catch all possible paths- uses
0
as a default file descriptor for FastCGI - uses
add_main_options_entries
for compatibility with GIO (>=2.40)
Status handling
The feature was initially planned for the 0.2
minor release, but it could be easily merged in master
. It provides new helpers on the Router
to handle thrown status codes.
app.status (404, (req, res) => {
// handle a 404 error...
});
The null
rule
Using null
as a rule will match all possible request paths so that it can be conveniently used to create catch-all routes.
app.get (null, (req, res) => {
res.write ("Hello world!".data);
});
Combined with all
, it provides a simple mechanism to build middlewares.