1.0.4 • Published 3 years ago
redis-async-await-ts v1.0.4
Async Redis in Typescript
Installation
To install the stable version:
npm install --save redis-async-await-ts
Usage Example
Creating Connection
import { init, client } from "redis-async-await-ts";
init();
client.on("error", function (err) {
console.log("Error " + err);
});
Read & Write
import { client } from "redis-async-await-ts";
const asyncBlock = async () => {
await client.set("colors", { red: "rojo" });
const value = await client.get<{red: string}>("colors");
console.log(value.red);
};
License
MIT