Application

    Application class. Brings together all the components of Hummingbird together

    Application.swift:172
    struct Application<Responder> where Responder : HTTPResponder, Responder.Context : InitializableFromSource, Responder.Context.Source == ApplicationRequestContextSource
    let router = Router()
    router.middleware.add(MyMiddleware())
    router.get("hello") { _ in
        return "hello"
    }
    let app = Application(responder: router.buildResponder())
    try await app.runService()

    Editing the application setup after calling runService will produce undefined behaviour.

    Citizens in Hummingbird

    Conformances

    Type members

    Instance members

    Instance features

    Citizens in Hummingbird

    where Responder:HTTPResponder, Responder.Context:InitializableFromSource, Responder.Context.Source == ApplicationRequestContextSource

    Conformances

    Instance members