A PHP Error was encountered

Severity: Warning

Message: fopen(/tmp/ci_sessioni2ap1bjm88tstdcd1771dn1oi73cfm54): failed to open stream: No space left on device

Filename: drivers/Session_files_driver.php

Line Number: 176

Backtrace:

File: /var/www/html/application/controllers/Project.php
Line: 10
Function: __construct

File: /var/www/html/index.php
Line: 311
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Failed to read session data: user (path: /tmp)

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /var/www/html/application/controllers/Project.php
Line: 10
Function: __construct

File: /var/www/html/index.php
Line: 311
Function: require_once

QR code generator using Express.js in Node.js | samim
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

Comments

No comments yet

Download Packet

Reviews Report

Submitted by Samim Raja Mollick (samim)

Download packets of source code on Coders Packet