Coders Packet

QR code generator using Express.js in Node.js

By Samim Raja Mollick

This is a simple project to generate QR code generator in Node.js. I have used Express.js which is a web application framework of Node.js and I have also used ejs.

EJS is a simple templating language that is used in JavaScript to embed JavaScript code in HTML. We can generate HTML dynamically on the server side using ejs and output the result to the browser.

First of all, we have to install some dependencies from the npm package manager.

npm i express ejs qrcode

The above command will install all three dependencies together.

After that, I have created an index.ejs file to take the text or URL as input from the user for generating the QR code and also created a scan.ejs to display the QR code. Then set up both ejs files as the template engine in our main server file which is index.js.



Download Complete Code


No comments yet

Download Packet

Reviews Report

Submitted by Samim Raja Mollick (samim)

Download packets of source code on Coders Packet