The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Rename consoleLogger
3 years ago
Better Error Handling
3 years ago
This release makes error handling inside middleware a lot more straightforward. It also adds support for automatic response serialization for asynchronous NIO errors.
Fix Dependency URL
3 years ago
Fix File Middleware and Add Basic Templating Support
4 years ago
Asynchronous Middleware Output
4 years ago
The vast majority of operations performed in a server-side app are asynchronous: database connections, file reads, network requests, etc. As such the middleware API introduced so far was categorically flawed. This releases fixes that by introducing EventLoopFuture based middleware that can ensure good interop with other existing Swift server-side software.
Update package syntax to 5.2
4 years ago
Type-safe Middleware
4 years ago
This release makes working with custom middleware a little less error-prone. Thanks to @jnutting for the feedback and pitch.
Prior to this, it was left to the developer to remember to either call next() or finalize the response. This release adds a requirement for middleware to return a result, which will put the compiler to work and help avoid human-error.
Static file Middleware
4 years ago
Now you can use the `staticFileHandler` in your app to serve static files.
```swift
app.use(staticFileHandler())
```
By default, it will look for files in the `/Public` folder relative to the working directory. In Xcode, this has to be set up in the scheme manually.
To override the static file directory:
```swift
app.use(staticFileHandler("/Static"))
```
Path & Query Parameters
4 years ago
Handle POST requests
4 years ago