Socket
Book a DemoInstallSign in
Socket

@notadd/addon-redis

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@notadd/addon-redis

The redis addon for Notadd modules.

latest
Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
0
-100%
Maintainers
4
Weekly downloads
 
Created
Source

nt-addon-redis

Redis addon for Notadd.

Installation

# install
$ npm install @notadd/addon-redis

or

$ yarn add @notadd/addon-redis

Usage

app.module.ts

import { Module } from '@nestjs/common';
import { RedisAddon } from '@notadd/addon-redis'

@Module({
    import: [
        RedisAddon.forRoot({
            // redis connection options, such as host, port, etc
        })
    ]
})
export AppModule { }

xxx.service.ts

import { Injectable } from '@nestjs/common';
import { RedisService } from '@notadd/addon-redis';

@Injectable()
export class TestService {
    constructor(
        @Inject(RedisService) private readonly redisService: RedisService
    ) { }

    // service method usage
    async test() {
        // redis hset
        await this.redisService.hset(key, field, value);
        // redis hget
        await this.redisService.hget(key, field);
    }
}

Keywords

Notadd

FAQs

Package last updated on 17 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts