snippets_js
Integration
New integration from credential
const redis = await yepcode.integration.redis('credential-slug')
New integration from plain authentication data
const { createClient } = require("redis");
const redis = createClient({
url: "the-url", /* protocol://host:port */
username: "the-username",
password: "the-password",
database: theDatabaseNumber
});
redis.on("error", console.error);
await redis.connect();
Set a New Entry
Set a new entry
await redis.set("the-key", "the-value")
Get Entry
Get entry
await redis.get("the-key")
Delete Entry
Delete entry
await redis.del("the-key")