NODEJS 中使用二维码 qr-image

https://www.npmjs.com/package/qr-image

 

 

npm install qr-image

 

 var qr = require('qr-image');

 

var code = qr.image("yourcodehere", {type: 'png'});
res.setHeader('Content-type', 'image/png'); //sent qr image to client side
code.pipe(res);

posted @ 2018-07-20 22:21  xfbx  阅读(4920)  评论(0编辑  收藏  举报