@jmrl23/redis-store
TypeScript icon, indicating that this package has built-in type declarations

2.4.4 • Public • Published

@jmrl23/redis-store

Redis simplified wrapper

Sample usage

import redisStore from '@jmrl23/redis-store';

async function main() {
  const store = redisStore({
    url: 'redis://',
    prefix: 'Example',
  });

  await store.set('message', 'Hello, World!');

  const message = await store.get<string>('message');

  console.log(message); // Hello, World!

  await store.del('message');

  await store.disconnect();
}

void main();

Additional Options

Key Description Type
prefix Prefix for keys string?
ttl Time to Live, 0 is to disable number?

Package Sidebar

Install

npm i @jmrl23/redis-store

Weekly Downloads

6

Version

2.4.4

License

MIT

Unpacked Size

8.76 kB

Total Files

8

Last publish

Collaborators

  • jmrl23