1.1.0 • Published 1 year ago
@josemarinho/unleash v1.1.0
Description
Nest Lib To Communicate With Unleash Feature Toggle.
Installation
$ npm install @josemarinho/unleashRunning the app
Once the installation process is complete, we can import the UnleashModule into the root AppModule.
import { Module } from '@nestjs/common';
import { UnleashModule } from '@josemarinho/unleash';
@Module({
imports: [
UnleashModule.forRoot({
appName: 'app-name',
url: 'url-api',
apiKey: '<UNLEASH_API_TOKEN>'
}),
],
...
})
export class AppModule {}Utilization
For get feature toggles from unleash, its necessary inject UnleashService
import { Injectable } from '@nestjs/common';
import { UnleashService } from '@josemarinho/unleash';
@Injectable()
export class AppService {
constructor(private readonly unleash: UnleashService) {}
async get(key: string) {
return await this.unleash.isEnabled(key);
}
}After your app it's ready to running.
1.1.0
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago
0.0.21
2 years ago
0.0.20
2 years ago
0.0.18
2 years ago
0.0.17
2 years ago
0.0.16
2 years ago
0.0.15
2 years ago
0.0.14
2 years ago
0.0.13
2 years ago
0.0.12
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago