nest-influxdb
v0.0.3
Published
InfluxDB module for Nest based on the official [InfluxDb package](https://yarnpkg.com/en/package/influx).
Downloads
1,063
Maintainers
Readme
Description
InfluxDB module for Nest based on the official InfluxDb package.
Installation
npm install nest-influxdb --save
or
yarn add nest-influxdb
Usage
import { Module } from "@nestjs/common";
import { InfluxDbModule, InfluxModuleOptions } from "nest-influxdb";
import { UtilsModule } from "./utils/utils.module";
import { ConfigService } from "./utils/config/config.service";
@Module({
imports: [
InfluxDbModule.forRootAsync({
imports: [UtilsModule],
inject: [ConfigService],
useFactory: async (
config_servie: ConfigService
): Promise<InfluxModuleOptions> => {
return {
host: config_servie.get("INFLUX_HOST")
};
}
}),
BlogModule
],
controllers: [AppController],
providers: [AppService]
})
export class AppModule {}