Skip to content

Instantly share code, notes, and snippets.

@serveba
Created February 3, 2016 11:42
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 serveba/6bc53e99d0e8f0c096d9 to your computer and use it in GitHub Desktop.
Save serveba/6bc53e99d0e8f0c096d9 to your computer and use it in GitHub Desktop.
nodeJS qr code generator example
'use strict';
var QRCode = require('qrcode');
var from = 1;
var to = 100;
/**
* Generates 'to' qr png images with the numbers
*/
for (var i = from; i <= to; i++) {
QRCode.save('generatedqr_' + i + '.png', i + '', null,
function(err, written) {
console.log(written + ' bytes written.');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment