Created
February 3, 2016 11:42
-
-
Save serveba/6bc53e99d0e8f0c096d9 to your computer and use it in GitHub Desktop.
nodeJS qr code generator example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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