Skip to content

yankeexe/openfaas-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenFaas Functions

Read my blog on OpenFaas Functions

Returns meaning of words provided.

Installation Instructions

Build, Push, and Deploy the function

faas-cli build -f functions.yml --filter pydict

faas-cli push -f functions.yml --filter pydict

faas-cli deploy -f functions.yml --filter pydict

Invoke the function:

echo "brevity" | faas-cli invoke pydict

2. ytdl

Download mp3 from provided URL

Installation Instructions

Build, Push, and Deploy the function

faas-cli build -f functions.yml --filter ytdl -b ADDITIONAL_PACKAGE=ffmpeg

faas-cli push -f functions.yml --filter ytdl

faas-cli deploy -f functions.yml --filter ytdl

Invoke the function:

echo "<url>" | faas-cli invoke ytdl > <filename.mp3>

Translate between languages.

Installation Instructions

Build, Push, and Deploy the function

faas-cli build -f functions.yml --filter translator

faas-cli push -f functions.yml --filter translator

faas-cli deploy -f functions.yml --filter translator

Invoke the function: Make sure the terminal supports encoding. If not use API testing tool like Insomnia or Postman.

des: output language; defaults to 'en'.

Complete list of supported languages.

echo '{"text": "नमस्ते", "des": "ko"}' | fc invoke translator --content-type "application/json"