# QRCode
# Overview
QRCode node helps in generating QRCode for a given string content. The node generates a base64 encoded png url.
# Setup
# Prerequisites
Not applicable
# Installation
To install the node from designer:
- Go to Add more nodes option on the palette section.
- Check for the QRCode node and click install.
- Once installed, the designer is required to be restarted.
To install the node from CLI:
- Go to your project workspace where you can see your
package.json
file. - Run the below give npm command.
npm i @kumologica/kumologica-contrib-qrcode
# Technical Details
Properties
- QR String (Required)
String content for which you need to generate the QRCode. - Margin (optional)
Margin or the quiet zone around the QRCode. Default value is 10. - Width (optional)
Width of the QRCode to be generated. Default value is 200.
By default, automatic mode selection is used. Manual or mixed mode is not supported. The input string is automatically split in various segments optimized to produce the shortest possible bit stream.
Supported Operations
Not Applicable
Throws
QRCode node throws the following exception.
- QRCode generation Failed
Returns
QRCode generated will be a base64 encoded png and will be available as part of the payload. None of the variables will be overwritten or enriched by this node.
# Develop a Service
Video tutorial
# Instructions
Drag a drop an EventListener node from the palette to the canvas. Open the settings, configure the following and Save.
Display Name : GET /qrcode Event Source : Amazon API gateway Verb : GET URL : /qrcode
From the automation category add QRCode node to the canvas. Open the settings, configure the following and Save.
QR String : https://www.kumologica.com Margin : 10 Width : 200
Wire the EventListener node to the QRCode node.
Add the template node to the canvas. Open the settings, configure the following and Save.
Target : $msg.payload Type : Mustache template
Template :
<html> <body> <img src="{{payload}}"/> </body> </html>
Add EventListener End node from the palette to the canvas. Open the settings, configure the following and Save.
Content-Type : text/html Payload : msg.payload
Wire the QRCode node to template node and template node to EventListener End node.
# Try it
← Excel QueueStorage →