is an example of the method of realizing the super simple generation of two-dimensional code by nodejs. Share to you for your reference, as follows:

(node-qrcode "_blank" rel= "external nofollow >"), the installation time need to install python, and does not support more than python3.0, python2.0 when installing the need to install other environment, so I give up.

finally chose a small plug-in qr-image (


 < as the front page; DOCTYPE html> <!; html> < head> < title> < < title =%> /title> < link rel='stylesheet'href='/stylesheets/style.css'/> < /head> < body> < h1> < title =%> < < img / h1> src= "/create_qrcode? Text=" /> < /body> < /html> 


 var backend code: QR = require ('qr-image') router.get (function '. (req, res, next) {res.render ('index', {title:'Exp Ress'});}); router.get ('/create_qrcode', function (req, res, next) {var text = req.query.text; try = {var img qr.image (text, {size, 10}); res.writeHead (200, {'Content-Type','image/png'}); img.pipe (RES); catch (E) {res.writeHead} (414, {'Content-Type'.'text/html'} (res.end);'< h1> 414 Request-URI Too Large< /h1>');}}) 

PS": here to recommend two two-dimensional code related online tools for your reference.

dimensional code generation tools in line (enhanced version)

to the nodejs program to help you.

you might be interested in this article:

This concludes the body part

This paper fixed link: | Script Home | +Copy Link

Article reprint please specify:A method of super simple generation of two-dimensional code by nodejs | Script Home

You may also be interested in these articles!