NPM npm install --save labstack
Yarn yarn add labstack
Sign up to get an API key
Create a file app.js with the following content:
const {Client, ApiError} = require('labstack')
const client = new Client('<API_KEY>')
client.barcodeGenerate({
format: 'qr_code',
content: 'https://labstack.com'
}).then(response => {
client.download(response.id, '/tmp/' + response.name)
})
.catch(error => {
console.error(error)
})From terminal run your app:
node app.js