Create influx-client

f_influx-checks
Ruakij 3 years ago
parent 44cd3288cf
commit d10e9bb2c6

@ -2,6 +2,7 @@ const logger = require("./helper/logger.js")("main");
const { requireEnvVars } = require("./helper/env.js"); const { requireEnvVars } = require("./helper/env.js");
const { exit } = require("process"); const { exit } = require("process");
const { InfluxDB } = require('@influxdata/influxdb-client');
/// Setup ENVs /// Setup ENVs
const env = process.env; const env = process.env;
@ -20,3 +21,8 @@ if(errorMsg){
exit(1); exit(1);
} }
(async function() {
logger.info("Setup Influx..");
const influxDb = new InfluxDB({url: env.INFLUX_URL, token: env.INFLUX_TOKEN});
})();

Loading…
Cancel
Save