The existing prototype in the Middleware module doesn't yet work correctly, this issue tracks being able to write something like:
try await server.serve(
handler: terminalHandler
) {
LoggingMiddleware()
MetricsMiddleware()
if authEnabled {
AuthMiddleware()
}
}
The existing prototype in the Middleware module doesn't yet work correctly, this issue tracks being able to write something like: