Browse Source

Remove unused keys

main
Haris Razis 4 years ago
parent
commit
616508e21b
No known key found for this signature in database GPG Key ID: 86A4D290ED03FAB4
  1. 7
      server/config/keys.js
  2. 12
      server/connections/influx_conn.js

7
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',

12
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}
module.exports = {writeApi, queryApi}
Loading…
Cancel
Save