Skip to content

nasainsbury/redis-bun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis-bun

An attempt to make a bun-redis client that interfaces directly with redis via TCP.

async function main() {
  const redis = new Redis({
    host: "127.0.0.1",
    port: 6379,
  });

  await redis.set("name", "Nathan", { expire: "8h" });
  const name = await redis.get("name");
}
async function main() {
  const redis = new Redis({
    host: "127.0.0.1",
    port: 6379,
  });

  const now = new Date().getTime() / 1000;
  const tomorrow = now + 60 * 60 * 24;

  await redis.set("name", "Nathan", { expireAbs: tomorrow });
  const name = await redis.get("name");
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published