Python, Node.js, Go and Rust
APIs deploy with no configuration, the way Vercel finds them: forkrail detects the framework, the entry file and the language version from your project.
Python
FastAPI, Flask, Django, FastHTML, or any ASGI or WSGI app.
- Entry: the first of
app.py,index.py,server.py,main.py,wsgi.py,asgi.py(at the top, then insrc/,app/andapi/) that definesapp,applicationorhandler. Or set[tool.vercel] entrypoint = "module:app"inpyproject.toml. Django’s comes frommanage.py. - Dependencies:
pyproject.toml(pinned byuv.lock),Pipfile.lock,Pipfileorrequirements.txt. - Version:
.python-version, elserequires-python, elsePipfile.lock. Lambda runs 3.12, 3.13 and 3.14; a project that names none runs 3.13. - WSGI apps (Flask, Django) run in 10 threads; ASGI apps run
asyncroutes on their event loop. - Django:
collectstaticruns at build time whenSTATIC_ROOTis set, and the router serves the files. Add your hosts toALLOWED_HOSTS.
from fastapi import FastAPIapp = FastAPI()@app.get("/api/hello")def hello(): return {"hello": "world"}Node.js
Express, Hono, Fastify, Koa, NestJS, Elysia, H3, or any server.* file.
- Entry: the first of
app,index,server,src/app,src/index,src/server(NestJS:src/main) with a.js,.mjs,.cjs,.ts,.mtsor.ctsextension that imports the framework, elsepackage.json’smain. - The app may listen on
PORTor export itself (export default app); both work, as on Vercel. - Version:
engines.node. Lambda runs Node 24 (the default) and 22. - Dependencies install with the project’s package manager, and its
vercel-buildorbuildscript runs. TypeScript is bundled with esbuild.
import { Hono } from 'hono'const app = new Hono()app.get('/', (c) => c.json({ ok: true }))export default appFunctions in api/
Vercel’s zero-config functions work the same way: every file in api/ is a function, served at its path without the extension.
api/hello.tsanswers/api/hello;api/index.tsanswers/api;api/users/[id].tsanswers/api/users/<id>withidin the query.- Node handlers take both of Vercel’s shapes:
export default function handler(req, res)withreq.query,req.body,res.json()and friends, or Web handlers likeexport function GET(request)returning aResponse. - Python files that define
app(ASGI or WSGI) or ahandlerclass are functions; other.pyfiles are modules. - Files and folders starting with
_or.aren’t functions. - Every function in a project runs on one language’s runtime. Node and Python functions in the same project, or functions beside a server, are refused for now.
export function GET(request: Request) { return Response.json({ hello: new URL(request.url).searchParams.get('name') ?? 'world' })}Go and Rust
- Vercel’s layout: each file in
api/is a function. Go files export onefunc(http.ResponseWriter, *http.Request). Rust files are[[bin]]targets written with thevercel_runtimecrate, unchanged. - A web server: a Go
mainpackage (main.go,cmd/api/main.go,cmd/server/main.go) or a Rust binary (axum, actix) that listens onPORT. - Go builds with
CGO_ENABLED=0; thegoline ofgo.modpicks the toolchain. Rust builds withcargo zigbuild --releasefor Amazon Linux 2023. - Both run on Lambda’s
provided.al2023runtime on arm64, and their module and target caches are kept between builds.
Choosing the preset yourself
Detection is automatic. To override it, set the preset under Settings → Build, with forkrail project NAME --framework SLUG (Vercel’s names: flask, django, express, hono, go, rust, vite and so on), or with framework in vercel.json, which wins.
New to forkrail? Install it in your AWS account and deploy your first app in about 20 minutes.
Quickstart