nest-influxdb

0.0.3 • Public • Published

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

Package Sidebar

Install

npm i nest-influxdb

Weekly Downloads

266

Version

0.0.3

License

MIT

Unpacked Size

46.6 kB

Total Files

29

Last publish

Collaborators

  • vlzh