Skip to content

amaui-org/amaui-redis

Repository files navigation



amaui logo

amaui Redis

Redis


MIT license     Production ready     100% test cov     Nodejs

Very simple code     Modern code     Junior friendly     Typescript     Made with 💛


Getting started

Add

  yarn add @amaui/redis

Add redis peer dependency.

  yarn add redis

Use

  import AmauiRedis from '@amaui/redis';
  // Make if you wanna a config file and
  // inside of it add all the process.env related props
  import Config from './config';

  // Make a new amqp instance
  const amauiRedis = new AmauiRedis({
    uri: Config.amqp.redis.uri
  });

  // Await for a client connection
  await amauiRedis.client;

  // Send to a queue
  await amauiRedis.publish('a', 'a'); 

Dev

Install

  yarn

Test

  yarn test

One time local setup

Install docker and docker-compose

Make docker containers

  yarn docker

Prod

Build

  yarn build