qrcode

command module
v0.0.0-...-84e6d7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2019 License: MIT Imports: 5 Imported by: 0

README

FaaS qrcode

Go Report Card

This repo contains an example FaaS function which uses the skip2/go-qrcode Go library to generate a QR Code for a string.

Deploying the Function

Make sure you have deployed a FaaS stack to your cluster using the instructions on the FaaS repo.

Use the CLI (faas-cli)

Get the CLI

The faas-cli can be installed via brew install faas-cli or curl -sSL https://get.openfaas.com | sudo sh.

Now deploy the function as follows:

# faas-cli -action deploy -image=faasandfurious/qrcode -name=qrcode -fprocess="/usr/bin/qrcode"
200 OK
URL: http://localhost:8080/function/qrcode
Testing the Function

Now that the function is running in your FaaS environment you can test it from the command line by running:

$ curl localhost:8080/function/qrcode --data "https://github.com/alexellis/faas" > qrcode.png

You can check the QR code works using your phone, or an online QR Code decoder (ZXing Decoder Online for example)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL