Skip to content

A typescript build-and-compile toolchain integration for faas-netes

Notifications You must be signed in to change notification settings

droidsolutions/faas-typescript

Repository files navigation

faas-typescript

This is an example for an implementation of a typescript/nodejs handler for openfaas. With integrated build-toolchian composed of husky(commitlint) and linter(prettier). It is essentially a port of the "openfaas: NodeInfo example" to typescript with an integrated build toolchain.

non-npm dependencies

In oder to execute the build- and deploy targets, you will need to install: "faas-cli". Edit the stack.yml file according to your cluster configuration. This project is optimized for a deployment on kubernetes ("faas-netes").

npm targets

npm run build: Build directive to compile typescript in ./handler to js in ./dist

npm run faas-build: Builds the docker-image for openfaas

npm run faas-deploy: Deploys the docker-image for openfaas on the configured gateway.

Usage

Try it out using:

npm install

npm run build

Deployment

Before considering a deployment, please edit your stack.yml file according to your cluster configuration. More information, see: "openfaas YAML Reference".

To deploy a function, run:

npm run faas-deploy

To build a function locally, run:

npm run faas-build

About

A typescript build-and-compile toolchain integration for faas-netes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published