Skip to content

Instantly share code, notes, and snippets.

@markbirbeck
Last active October 29, 2018 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markbirbeck/4969ff2152c3e0df03b5c4c4867555f7 to your computer and use it in GitHub Desktop.
Save markbirbeck/4969ff2152c3e0df03b5c4c4867555f7 to your computer and use it in GitHub Desktop.
const stream = require('stream')
const elasticsearch = require('elasticsearch')
class ElasticSearchWritableStream extends stream.Writable {
constructor(config) {
super()
this.config = config
/**
* Create the ElasticSearch client:
*/
this.client = new elasticsearch.Client({
host: this.config.host
})
}
}
module.exports = ElasticSearchWritableStream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment