gm-nest-activity-beta
v0.0.19
Published
nest
Downloads
23
Readme
Installation
Yarn | PNPM
yarn add gm-nest-activity-beta || pnpm i gm-nest-activity-beta
NPM
npm install gm-nest-activity-beta
Getting Started
Let's register the ActivityModule in app.module.ts
import { Module } from '@nestjs/common'
import { ActivityModule } from 'gm-nest-activity-beta';
@Module({
imports: [
ActivityModule.register({
APPID: string,
APP_SECRET: string,
DB_HOST: string,
DB_PORT: number,
DB_USER: string,
DB_PASS: string,
DB_NAME: string
}),
],
})
export class AppModule {}
With Async
import { Module } from '@nestjs/common'
import { ActivityModule } from 'gm-nest-activity-beta';
@Module({
imports: [
ActivityModule.registerAsync({
useFactory: (config: ConfigService) => config.get('activity'),
inject: [ConfigService]
})
]
})
export class AppModule {}
Options
export interface ActivityModuleOptions {
APPID: string;
APP_SECRET: string;
DB_HOST: string;
DB_PORT: number;
DB_USER: string;
DB_PASS: string;
DB_NAME: string;
}
That's it!