https://github.com/ganesshkumar/openfaas-identicon
OpenFaaS function to generation Identicons
https://github.com/ganesshkumar/openfaas-identicon
function identicon-generator openfaas openfaas-function
Last synced: 4 months ago
JSON representation
OpenFaaS function to generation Identicons
- Host: GitHub
- URL: https://github.com/ganesshkumar/openfaas-identicon
- Owner: ganesshkumar
- License: mit
- Created: 2017-12-17T20:25:26.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-21T12:23:37.000Z (almost 8 years ago)
- Last Synced: 2025-04-04T02:23:12.075Z (6 months ago)
- Topics: function, identicon-generator, openfaas, openfaas-function
- Language: Go
- Size: 9.77 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# openfaas-identicon
> OpenFaaS function to generation IdenticonsThis is a simple [FaaS](https://github.com/openfaas/faas) function inspired by Bart Fokker's [post](https://blog.bartfokker.nl/identicon/).
## Prerequisite
* Make sure you have deployed a FaaS stack to your cluster using the instructions on the [FaaS repo](https://github.com/alexellis/faas).
* Install [faas-cli](https://github.com/alexellis/faas-cli/) using `brew install faas-cli` or `curl -sSL https://get.openfaas.com | sudo sh`.## Usage
**Create a new function**
```
$ faas-cli new --lang go identicon
```**Clone this repo as the function**
```
$ rm -rf identicon$ git clone git@github.com:ganesshkumar/openfaas-identicon.git identicon
```**Installing the dependencies**
```
$ cd identicon$ dep ensure
# As of the build stage will throw an error when the vendor code(dependencies) doesn't comply gofmt
# So let's make sure our dependencies passes the gofmt check$ gofmt -w vendor/*
$ cd ..
```**Build and deploy**
```
$ faas-cli build -f identicon.yml$ faas-cli deploy -f identicon.yml
```**Testing the function**
```
$ curl localhost:8080/function/identicon --data "openfaas" > sample/openfaas.png
```