Browse Source

Delete 'influx.js'

master
cse47122 4 years ago
parent
commit
fd74b8d3f6
  1. 51
      influx.js

51
influx.js

@ -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
}
Loading…
Cancel
Save