Allow middleware to resolve a request by calling `request.redirect` or
`request.render` - after this point, the request stops processing and
renders immediately.
Permit setting template during view render with `request.setTemplate()`
Permit middleware to define custom routes to static content with
`pub const Routes` (implemented for something no longer needed but seems
useful anyway).
Implement globbing on custom routes, `/foo/:bar*` will glob all path
segments including and after `/foo/...`, e.g. `/foo/bar/baz/qux` will
pass invoke the custom view function with an array of `bar`, `baz`,
`qux` as first argument (instead of typical resource ID).
In `main()`:
```zig
app.route(.GET, "/custom/:id/foo/bar", @import("app/views/custom/foo.zig"), .bar);
```
Routes `GET` request with path (e.g.) `/custom/1234/foo/bar` to `bar()`
defined in `src/app/views/custom/foo.zig`.
Routes with an `:id` segment expect a function with three parameters,
routes without an `:id` segment expect a function with two parameters
(i.e. the same as `get` vs `index`).
Use Karl Seguin's http.zig as HTTP server backend:
https://github.com/karlseguin/http.zig
Update loggers to use new `jetzig.loggers.LogQueue` to offload logging
to a background thread.
Numerous other optimizations to remove unneeded allocs.
Performance jump on a simple request from approx. 2k requests/second to
approx. 40k requests/second (Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz).
Color support for Windows
Zmpl partial arg type coercion
Remove need to add all mail template params to view response data. This
was originally intended functionality but the wrong value was passed to
the `deliver` function, and no `data` argument was given, making it
cumbersome to create new values.
Render `src/app/views/errors.zig` view (`index` action) when an
unexpected error occurs. If the view does not exist, try rendering
`public/404.html`, `public/500.html` (etc.), finally falling back to a
standard basic HTML/JSON response.
Create mailers with `jetzig generate mailer <name>`. Mailers define
default values for email fields (e.g. subject, from address, etc.).
Mailers use Zmpl for rendering text/HTML parts.
Send an email from a request with `request.mail()`. Call
`deliver(.background, .{})` on the return value to use the built-in
mail job to send the email asynchronously.
Improve query/HTTP request body param parsing - unescape `+` and `%XX`
characters.