From 616508e21bb65b89a456cb7f82154c809dafaed5 Mon Sep 17 00:00:00 2001 From: Haris Razis Date: Fri, 18 Dec 2020 12:49:23 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9D=8C=20Remove=20unused=20keys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/config/keys.js | 7 +++---- server/connections/influx_conn.js | 12 ++++-------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/server/config/keys.js b/server/config/keys.js index 1937595..3b3e338 100644 --- a/server/config/keys.js +++ b/server/config/keys.js @@ -1,8 +1,7 @@ module.exports = { - influx_uri: 'http://influx:8086', - influx_token: '', - influx_org: '', - influx_bucket: '', + influx_url: 'http://influx:8086', + influx_org: 'xrazis', + influx_bucket: 'db0', redis_user: '', redis_password: '', redis_uri: 'redis://redis:6379', diff --git a/server/connections/influx_conn.js b/server/connections/influx_conn.js index 868ccf3..33ef718 100644 --- a/server/connections/influx_conn.js +++ b/server/connections/influx_conn.js @@ -1,20 +1,16 @@ const {InfluxDB} = require('@influxdata/influxdb-client') const chalk = require('chalk') -const {influx_uri, influx_token, influx_org, influx_bucket} = require('../config/keys') +const {influx_url, influx_org, influx_bucket} = require('../config/keys') const client = new InfluxDB({ - url: influx_uri, - token: influx_token, + url: influx_url }); -const write = client.getWriteApi( - influx_org, - influx_bucket -); +const writeApi = client.getWriteApi(influx_org, influx_bucket, 's'); const queryApi = client.getQueryApi(influx_org); console.log(chalk.greenBright.bold('Connected to influx!')) -module.exports = {write, queryApi} \ No newline at end of file +module.exports = {writeApi, queryApi} \ No newline at end of file