From d10e9bb2c67dd4b3c1b0c55185722fc79c2ae8fb Mon Sep 17 00:00:00 2001 From: Ruakij Date: Fri, 26 Nov 2021 17:43:42 +0100 Subject: [PATCH] Create influx-client --- src/main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.js b/src/main.js index aa95a1c..95e1037 100644 --- a/src/main.js +++ b/src/main.js @@ -2,6 +2,7 @@ const logger = require("./helper/logger.js")("main"); const { requireEnvVars } = require("./helper/env.js"); const { exit } = require("process"); +const { InfluxDB } = require('@influxdata/influxdb-client'); /// Setup ENVs const env = process.env; @@ -20,3 +21,8 @@ if(errorMsg){ exit(1); } +(async function() { + logger.info("Setup Influx.."); + const influxDb = new InfluxDB({url: env.INFLUX_URL, token: env.INFLUX_TOKEN}); + +})();