Introduction
Self-hosted FaaS platform, high performance, easy to learn, fast to code
Documentation: https://fastfn.dev/en/
Source Code: https://github.com/misaelzapata/fastfn
FastFN is a CLI-friendly, self-hosted FaaS server for building file-routed APIs, shipping SPA + API stacks, and keeping the whole project easy to run locally or on a VM.
A weekend project that got out of hand.
The key features are:
- Fast to code: Drop a file, get an endpoint, and keep the route tree close to the code that serves it.
- Automatic Docs: Interactive API documentation (Swagger UI) generated automatically from your code.
- Polyglot Power: Use the best tool for the job. Python, Node, PHP, Lua, Rust, or Go in one project.
- SPA + API: Mount a configurable
public/ordist/folder at/and keep simple API handlers beside it.
Quick Start • SPA + API • Linux Service • Public Assets
What you get in the first 5 minutes¶
- Create one function file and serve it locally.
- Call the route immediately with
curl. - Open automatic docs at
http://127.0.0.1:8080/docs. - Keep scaling the same API with Python, Node, PHP, Lua, and Rust under one URL tree.
- Serve a simple SPA and a tiny API together when that is the better fit.
5-minute path (recommended order)¶
- Tutorial: Quick Start
- Tutorial: Serve a SPA and API Together
- How-to: Zero-Config Routing
- Reference: HTTP API definition
- Article: Cloudflare-Style Public Assets
- How-to: Run as a Linux Service
If you are reading this page on GitHub and a styled card below does not resolve correctly, use these direct links:
- Quick Start
- Serve a SPA and API Together
- Zero-Config Routing
- HTTP API definition
- Cloudflare-Style Public Assets
- Run as a Linux Service
Start in 60 seconds¶
1. Drop a file, get an endpoint¶
Create a file named hello.js (or .py, .php, .rs):
2. Run the server¶
3. Call your API¶
Expected response:
No serverless.yml. No framework boilerplate. File routes are discovered automatically.
4. Open the generated docs¶
- Swagger UI:
http://127.0.0.1:8080/docs - OpenAPI JSON:
http://127.0.0.1:8080/openapi.json
If you want the shortest path from zero to production-like usage, go in this order:
Documentation¶
This documentation is structured to help you learn FastFN step-by-step, from your first route to production deployment.
-
Getting Started
Install FastFN and build your first API endpoint in 5 minutes.
-
Core Concepts
Understand how file-system routing and configuration work.
-
Support Matrix
See what FastFN gives you out of the box and where it fits best.
-
Learn (The Course)
A complete 4-part course to build a real-world API from scratch.
-
How-To Guides
Practical recipes for deployment, authentication, and more.
Key Features¶
- Magic Routing:
[id],[...slug]supported out of the box. - Low overhead gateway: OpenResty validates policy and dispatches over local unix sockets.
- Standards Based: Fully compliant OpenAPI 3.1 generation for all your functions.
- Developer First: The platform adapts to your files, not the other way around.
- Multi-Runtime: Python, Node, PHP, Lua, and Rust with one contract.
Quick Links¶
- HTTP API definition
- Serve a SPA and API Together
- Cloudflare-Style Public Assets
- Run as a Linux Service
- Runtime Contract
- Typed Inputs and Responses
- Built-in Functions
- Support Matrix (Advanced Protocols)
- Operational Recipes
- Security Confidence Checklist
Extended Tutorials¶
- Build a complete API (end-to-end)
- QR patterns in Python + Node + PHP + Lua (dependency isolation)
- Versioning and rollout
- Auth and secrets