https://github.com/arkerlabs/redisk-nestjs
NestJS module for Redisk.
https://github.com/arkerlabs/redisk-nestjs
Last synced: about 2 months ago
JSON representation
NestJS module for Redisk.
- Host: GitHub
- URL: https://github.com/arkerlabs/redisk-nestjs
- Owner: ArkerLabs
- Created: 2020-01-24T19:31:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-07T20:28:59.000Z (about 2 years ago)
- Last Synced: 2025-04-12T10:06:58.336Z (about 2 months ago)
- Language: TypeScript
- Size: 19.5 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Redisk for Nestjs
=====
[](https://badge.fury.io/js/redisk-nestjs)Module for using [Redisk](https://github.com/ArkerLabs/redisk) in NestJS.
## Getting started
```bash
npm install redisk-nestjs redisk --save
```### Usage
```ts
import { Module } from '@nestjs/common';
import { RediskModule } from 'redisk-nestjs';@Module({
imports: [
RediskModule.forRoot({
url: 'redis://127.0.0.1:6379/0',
}),
],
})
export class AppModule {}
```### Example
```ts
import { Controller, Get } from '@nestjs/common';
import { Redisk } from 'redisk';@Controller('cats')
export class CatsController {
constructor(private readonly redisk: Redisk) {}@Get()
async findAll(): Promise {
return this.redisk.list(Cat);
}
}
```