@tomsd/redis-client
v1.0.1
Published
It's a wrapper of uiredis.
Downloads
2
Readme
@tomsd/redis-client
It's a wrapper of ioredis.
See redis-client.netlify.app also.
Installation
npm install @tomsd/redis-client
Usage
import { Redis } from "@tomsd/redis-client";
interface Some {
key: string;
name: string;
message: string;
}
const redis = new Redis<Some>({
keyProp: "key",
options: {
port: 6379,
host: "somehost",
}
});
console.log(
await redis.set({
key: "key",
name: "name",
message: "message",
})
) // { key: "key", name: "name", message: "message" }
console.og(
await redis.getKeys()
) // ["key"]
console.log(
await redis.get("key")
) // { key: "key", name: "name", message: "message" }
console.log(
await redis.del("key")
) // 1