diff --git a/influx.js b/influx.js deleted file mode 100644 index 7e1ee1b..0000000 --- a/influx.js +++ /dev/null @@ -1,51 +0,0 @@ -const Influx = require('influx') - -module.exports = function init () { - const influx = new Influx.InfluxDB({ - host: process.env.INFLUX_HOST || '172.18.0.1', - database: process.env.INFLUX_DATABASE || 'dummy-data', - schema: [ - { - measurement: 'temperature', - fields: { - value: Influx.FieldType.INTEGER - }, - tags: [ - 'deviceId' - ] - }, - { - measurement: 'air_humidity', - fields: { - value: Influx.FieldType.INTEGER - }, - tags: [ - 'deviceId' - ] - }, - { - measurement: 'ground_humidity', - fields: { - value: Influx.FieldType.INTEGER - }, - tags: [ - 'deviceId' - ] - }, - { - measurement: 'airforce', - fields: { - value: Influx.FieldType.INTEGER - }, - tags: [ - 'deviceId' - ] - } - ] - }) - influx.createDatabase(process.env.INFLUX_DATABASE) - .catch(console.error) - - return influx -} -