Contents

hummingbird-project/hummingbird-redis

> This package can be replaced with [hummingbird-valkey](https://github.com/hummingbird-project/hummingbird-valkey). Currently hummingbird-valkey is in pre-release but when v1.0 is released this package will be deprecated.

Usage

import Hummingbird
import HummingbirdRedis

let redis = try RedisConnectionPoolService(
    .init(hostname: redisHostname, port: 6379),
    logger: Logger(label: "Redis")
)

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

Documentation

Reference documentation for HummingbirdRedis can be found here

Package Metadata

Repository: hummingbird-project/hummingbird-redis

Default branch: main

README: README.md