Skip to content

Introduction

FastFN Logo

Self-hosted FaaS platform, high performance, easy to learn, fast to code

GitHub Docs Coverage


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/ or dist/ folder at / and keep simple API handlers beside it.

FastFN terminal demo

Quick StartSPA + APILinux ServicePublic 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.
  1. Tutorial: Quick Start
  2. Tutorial: Serve a SPA and API Together
  3. How-to: Zero-Config Routing
  4. Reference: HTTP API definition
  5. Article: Cloudflare-Style Public Assets
  6. 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:

Start in 60 seconds

1. Drop a file, get an endpoint

Create a file named hello.js (or .py, .php, .rs):

// hello.js
exports.handler = async (event) => ({
  message: 'Hello from FastFN!',
  query: event.query || {},
  runtime: 'node',
});
# hello.py
def handler(event):
    name = event.get("query", {}).get("name", "World")
    return {
        "status": 200,
        "body": {"hello": name, "runtime": "python"}
    }

2. Run the server

fastfn dev

3. Call your API

curl "http://127.0.0.1:8080/hello?name=Misael"

Expected response:

{
    "message": "Hello from FastFN!",
    "query": {
        "name": "Misael"
    },
    "runtime": "node"
}

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:

  1. Quick Start
  2. From Zero
  3. HTTP API definition
  4. Deploy to Production

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.

    Quick Start

  • Core Concepts

    Understand how file-system routing and configuration work.

    File-System Routing

  • Support Matrix

    See what FastFN gives you out of the box and where it fits best.

    Explore Support Matrix

  • Learn (The Course)

    A complete 4-part course to build a real-world API from scratch.

    Start the Course

  • How-To Guides

    Practical recipes for deployment, authentication, and more.

    See Guides

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.

Extended Tutorials

Visual Guides

Last reviewed: March 28, 2026 · Docs on fastfn.dev