@beincom/zanc
v0.0.2
Published
Application states management library for NestJS
Downloads
120
Maintainers
Keywords
Readme
Description
Application states management module for Nest.
Installation
$ npm i --save @beincom/zanc
Quick Start
import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { AppStatesModule } from '@beincom/zanc';
import { AppService } from './app.service';
import { AppController } from './app.controller';
@Module({
imports: [
MongooseModule.forRoot(
'mongodb://root:root@localhost:2379/?retryWrites=true&w=majority',
{
dbName: 'mydatabase',
},
),
AppStatesModule.forRootAsync({
name: 'api-service',
controllerOptions: {
basePath: 'app-states',
secretKey: '9b688bd4-9971-4661-bbb0-03f691bc5874',
},
useFactory: () => {
return {
notifier: {
channel: 'sync-app-states',
redisOptions: {
host: '127.0.0.1',
port: 6379,
},
},
};
},
}),
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
Stay in touch
- Author - Thân Thế Văn
- Website - https://beincom.com
License
Library is MIT licensed.