0.0.3 • Published 5 years ago

nest-influxdb v0.0.3

Weekly downloads
278
License
MIT
Repository
github
Last release
5 years ago

npm version downloads issues

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 {}