Socket
Book a DemoInstallSign in
Socket

@westh/influx

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@westh/influx

Very toit InfluxDB client that only supports inserts

1.1.0
unpublished
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@westh/influx

Insert data into InfluxDB.

This code is stupid and tiny. Upside of that is that it is simple. It's basically just a wrapper of InfluxDB's API.

If you need something more capable check out the official client.

Installation

npm install @westh/influx

Usage

const influx = require('@westh/influx')

influx.init({
  url: 'https://eu-central-1-1.aws.cloud2.influxdata.com',
  org: 'stupid-org',
  bucket: 'stupid-bucket',
  token: 'this-is-definitely-a-real-token-1337=='
})

try {
  const exampleData = {
    measurementName: 'test-name',
    host: 'test-host',
    data: {
      testFieldOne: 1,
      testFieldTwo: 1.234,
      testFieldThree: 'could-also-be-a-string'
    }
  }
  await influx.insert(exampleData)
} catch (error) {
  console.error(error)
}

Testing

Before running yarn test you have to run yarn build, as the test script relies on the transpiled version.

License

MIT

Keywords

influx

FAQs

Package last updated on 03 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.