hummingbird

1.11.0

Lightweight, flexible HTTP server framework written in Swift
hummingbird-project/hummingbird

What's New

v1.11.0

2023-12-22T11:33:41Z

Minor release changes

  • Make HBMethods.constructResponder public. PR #316

Other changes

  • Update CONTRIBUTORS.md
  • Fix small code mistake in Encoding and Decoding.md. PR #304 from @sidepelican

Lightweight, flexible, modern server framework written in Swift.

Hummingbird

Hummingbird is a lightweight, flexible modern web application framework that runs on top of a SwiftNIO based server implementation. It is designed to require the minimum number of dependencies.

It provides a router for directing different endpoints to their handlers, middleware for processing requests before they reach your handlers and processing the responses returned, custom encoding/decoding of requests/responses, TLS and HTTP2.

import Hummingbird

// create router and add a single GET /hello route
let router = Router()
router.get("hello") { request, _ -> String in
    return "Hello"
}
// create application using router
let app = Application(
    router: router,
    configuration: .init(address: .hostname("127.0.0.1", port: 8080))
)
// run hummingbird application
try await app.runService()

Hummingbird v2 is currently in development an beta release is available if you'd like to try it out.

Hummingbird Extensions

Hummingbird is designed to require the least number of dependencies possible, but this means many features are unavailable to the core libraries. Additional features are provided through extensions. The Hummingbird repository comes with additional modules

  • HummingbirdJobs: framework for pushing work onto a queue to be processed outside of a request (possibly by another server instance).
  • HummingbirdRouter: an alternative router that uses a resultbuilder.
  • HummingbirdTLS: TLS support.
  • HummingbirdHTTP2: Support for HTTP2 upgrades.
  • HummingbirdTesting: helper functions to aid testing Hummingbird projects.

And also the following are available in other repositories in this organisation

Documentation

You can find reference documentation and user guides for Hummingbird here. The hummingbird-examples repository has a number of examples of different uses of the library.

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Wed Nov 20 2024 22:37:51 GMT-1000 (Hawaii-Aleutian Standard Time)