Skip to content

Instantly share code, notes, and snippets.

@anthonycoffey
Last active June 11, 2019 20:19
Show Gist options
  • Save anthonycoffey/62492a659cc594e68a887be62a76e1d0 to your computer and use it in GitHub Desktop.
Save anthonycoffey/62492a659cc594e68a887be62a76e1d0 to your computer and use it in GitHub Desktop.
First iteration of custom Highcharts export module
const exporter = require('highcharts-export-server');
exports.module = function(exportSettings){
return new Promise((resolve, reject) => {
exporter.initPool()
exporter.export(exportSettings, function(err, res){
if(err){
console.log(err)
return reject(err)
}
const data = res.data
exporter.killPool()
return resolve(data)
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment