Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spekulatius/faasd-franc
faasd function for franc lib
https://github.com/spekulatius/faasd-franc
faas faas-platform faasd franc
Last synced: about 1 month ago
JSON representation
faasd function for franc lib
- Host: GitHub
- URL: https://github.com/spekulatius/faasd-franc
- Owner: spekulatius
- Created: 2020-11-30T17:55:11.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-13T11:06:16.000Z (almost 4 years ago)
- Last Synced: 2024-05-03T04:00:50.609Z (8 months ago)
- Topics: faas, faas-platform, faasd, franc
- Language: JavaScript
- Homepage: https://releasecandidate.dev/posts/2021/discovery-faasd-and-openfaas/
- Size: 175 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# faasd function for Franc
**This is part of [my personal exploring](https://github.com/spekulatius/hacks) and probably not production ready. Use at own risk!**
## Preface
[faasd](https://github.com/openfaas/faasd) has been really interesting to explore and work with. It's a low-footprint no/low-maintenance Function as a Service toolkit. Broadly speaking, faasd's goal is to simplify the required setup and run functions easier.
I wanted to build a super simple api endpoint to familiarize myself more with the concepts and learn. I picked the [Franc](https://github.com/wooorm/franc) npm package. Franc is a npm lib which allows you to detect the language of a given piece of text.
The faasd function for franc is the result. It should work, but no guarantees.
## Building Your Own Version
1. You can easily build your own version and host it on your faasd instance:
```bash
git clone [email protected]:spekulatius/faasd-franc.git && cd faasd-franc
```2. Create the secret:
```bash
echo $(head -c 16 /dev/urandom | shasum | cut -d "-" -f1) > token.txt
```3. Store it on the server:
```bash
faas-cli secret create franc-token --from-file token.txt --gateway http://yourfaasd.somewhere.com:8080
```4. Deploy as usual:
```bash
faas-cli up --gateway http://yourfaasd.somewhere.com:8080
```