GithubHelp home page GithubHelp logo

spekulatius / faasd-franc Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 179 KB

faasd function for franc lib

Home Page: https://releasecandidate.dev/posts/2021/discovery-faasd-and-openfaas/

JavaScript 100.00%
faas faasd faas-platform franc

faasd-franc's Introduction

faasd function for Franc

This is part of my personal exploring and probably not production ready. Use at own risk!

Preface

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 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:

    git clone [email protected]:spekulatius/faasd-franc.git && cd faasd-franc
  2. Create the secret:

    echo $(head -c 16 /dev/urandom | shasum | cut -d "-" -f1) > token.txt
  3. Store it on the server:

    faas-cli secret create franc-token --from-file token.txt --gateway http://yourfaasd.somewhere.com:8080
  4. Deploy as usual:

    faas-cli up --gateway http://yourfaasd.somewhere.com:8080

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.