# FX ▲ fx 0.9.48 ready

Poor man's function as a service

fx is a CLI, not a web app — this page exists so Cloudron has a health endpoint and you have a landing spot (gated by the Cloudron auth proxy). You drive fx from the app's web terminal: open the terminal and run `fx -v` to confirm, then deploy function files to your own Docker hosts or Kubernetes clusters. Cloudron app containers have no Docker daemon, so functions always run on the target you point fx at, never inside this app.

Path | Purpose
--- | ---
`/app/data/functions/` | Function sources (`hello.js` + `hello.py` starters seeded)
`/app/data/ssh/` | SSH keys for remote Docker targets (fx logs in with a key, no passwords)
`/app/data/kube/` | kubeconfig for Kubernetes targets

Deploy to a remote Docker host (JS example):

    fx up --host deploy@example.com --ssh_key /app/data/ssh/id_rsa \
           --name hello /app/data/functions/hello.js
    fx list --host deploy@example.com
    fx down --host deploy@example.com hello

Deploy to Kubernetes (copy your kubeconfig to `/app/data/kube/config` first):

    export FX_KUBECONF=/app/data/kube/config
    fx up --name hello /app/data/functions/hello.py

Supported languages: Go, JavaScript, Python, Ruby, Java, PHP, Perl, Crystal, Rust, Julia, D. Upstream docs: github.com/metrue/fx