# fairyfly > Documentation for Fairyfly, a serverless-first backend JavaScript runtime built with Zig and powered by QuickJS. - [Introduction](https://fairyfly.dev/getting-started/introduction.md): What Fairyfly is, when to use it, and the three rules every developer must know. - [Installation](https://fairyfly.dev/getting-started/installation.md): Install the prebuilt binary with curl, build from source with Zig, or use Docker. - [Quickstart](https://fairyfly.dev/getting-started/quickstart.md): Run your first script and server in five minutes. - [Event loop](https://fairyfly.dev/concepts/event-loop.md): One thread, one loop — how timers, microtasks and I/O completions are ordered, and what keeps the process alive. - [Concurrency](https://fairyfly.dev/concepts/concurrency.md): One JS thread, a shared I/O pool, and up to 8 Workers — which primitive to reach for. - [Errors and exit codes](https://fairyfly.dev/concepts/errors.md): What throws, what gets swallowed, how uncaught errors surface, and the exit codes you'll see. - [Architecture](https://fairyfly.dev/concepts/architecture.md): Layers from QuickJS down to libxev, where each subsystem lives, and how the hot path stays allocation-free. - [Permissions](https://fairyfly.dev/concepts/permissions.md): Deny-by-default native API access — flags, scopes, enforcement points, and the error contract. - [HTTP Server](https://fairyfly.dev/guides/http-server.md): Start a server with http.serve — from hello-world to a JSON REST API. - [Fetch Client](https://fairyfly.dev/guides/fetch-client.md): Call other APIs with fetch — GET, POST, JSON, errors, redirects, and HTTPS trust. - [WebSocket](https://fairyfly.dev/guides/websocket.md): Real-time chat-style messaging — server upgrades, broadcast, and clients. - [TLS](https://fairyfly.dev/guides/tls.md): Serve HTTPS and WSS with the built-in BearSSL stack. - [HTTP/2](https://fairyfly.dev/guides/http2.md): Serve HTTP/2 over TLS with ALPN — same handler, same port, no code changes. - [Workers](https://fairyfly.dev/guides/workers.md): Offload CPU-bound work to threads — spawn, message, handle errors, terminate. - [Timers](https://fairyfly.dev/guides/timers.md): Run code later — setTimeout, setInterval, unref, microtasks, and limits. - [Logging](https://fairyfly.dev/guides/logging.md): console in practice — levels, timing, stderr redirection, and a structured-log pattern. - [Modules](https://fairyfly.dev/guides/modules.md): ESM imports that resolve — relative paths, bare packages, and the lookup rules. - [Process](https://fairyfly.dev/guides/process.md): argv, env, cwd, exit, pid — what process gives you, and what's missing on purpose. - [Environment Variables](https://fairyfly.dev/guides/env.md): Every FF_ variable — what it does, when to set it, and how to read env in code. - [Packages](https://fairyfly.dev/guides/packages.md): Add ESM dependencies with ff imprint, remove them with ff sever, and import them. - [Bytecode](https://fairyfly.dev/guides/bytecode.md): Ship without source — compile JS to .ffbc with ff compile and run it back. - [Testing](https://fairyfly.dev/guides/testing.md): Write and run tests with ff test and test/run.sh — the check/done pattern end to end. - [Deploy](https://fairyfly.dev/guides/deploy.md): Ship Fairyfly — build, install, Docker, ff start, smoke-test, and TLS. - [API overview](https://fairyfly.dev/api/overview.md): Every global Fairyfly injects, one row each, linking to its full reference. - [http API](https://fairyfly.dev/api/http.md): http.serve reference — signatures, options, handler contract, and helpers. - [fetch API](https://fairyfly.dev/api/fetch.md): fetch reference — signatures, init keys, Response, Request, and Headers. - [Request / Response / Headers](https://fairyfly.dev/api/request-response.md): Constructors, body readers, statics, and the Headers quirks (getAll, size()). - [WebSocket](https://fairyfly.dev/api/websocket.md): Real-time chat-style messaging — server upgrades, broadcast, and clients. - [udp API](https://fairyfly.dev/api/udp.md): udp.socket reference — POSIX-style datagram sockets: bind, sendto, recvfrom, and connected send/recv. - [Filesystem](https://fairyfly.dev/api/fs.md): File access — sync calls and *Async Promise variants: read, write, exists, mkdir, rm, readdir. - [console](https://fairyfly.dev/api/console.md): Output, colored aliases, and time/timeLog/timeEnd — every method and its quirks. - [Process](https://fairyfly.dev/api/process.md): argv, env, cwd, exit, pid, signals (on/once/off/kill) — what process gives you, and what's missing on purpose. - [child_process](https://fairyfly.dev/api/child-process.md): Subprocesses — spawn, exec, and execSync with captured output, exit codes, and signals. - [URL](https://fairyfly.dev/api/url.md): URL and URLSearchParams — parsing, mutation, base resolution, parse/canParse statics. - [crypto](https://fairyfly.dev/api/crypto.md): randomUUID, getRandomValues, subtle (digest, HMAC importKey/sign/verify/exportKey), bcrypt (hash, verify) — and btoa/atob, with their deviations. - [Text encoding](https://fairyfly.dev/api/text-encoding.md): TextEncoder and TextDecoder — UTF-8 only, lossy by default, no encodeInto. - [performance](https://fairyfly.dev/api/performance.md): performance.now() — monotonic milliseconds, and nothing else. - [Worker](https://fairyfly.dev/api/worker.md): The Worker API — postMessage, terminate, workerData, events, and the message contract. - [Blob and FormData](https://fairyfly.dev/api/blobs-formdata.md): Binary payloads and HTML forms — construct, inspect, send, and parse them. - [SQLite API](https://fairyfly.dev/api/sqlite.md): Database reference — open, query, write, transactions, and introspection. - [PostgreSQL API](https://fairyfly.dev/api/postgres.md): Native Postgres client — connect, query, parameter types, decoding, errors, transactions. - [FFI (ffi global)](https://fairyfly.dev/api/ffi.md): Load C-ABI shared libraries at runtime and call them from JS. - [CLI](https://fairyfly.dev/reference/cli.md): Every ff subcommand — syntax, flags, examples, and expected output. - [Limitations](https://fairyfly.dev/reference/limitations.md): Every hard limit in one place — know the caps before you design around them. - [Compatibility](https://fairyfly.dev/reference/compatibility.md): What's present, what's missing vs Node and browsers, and the substitutions to use. - [Examples](https://fairyfly.dev/reference/examples.md): Every runnable example, indexed by task — file, run command, expected result. - [Blog](https://fairyfly.dev/blog/index.md): Notes on Fairyfly's design, performance, releases, and the trade-offs behind the runtime. - [Fairyfly v0.3.0-beta: Deny-by-Default Permissions, 4× Lower Linux RSS, and Production Hardening](https://fairyfly.dev/blog/v0-3-0-beta.md): What is new in Fairyfly v0.3.0-beta and why we built it that way — deny-by-default permissions, 10 MB Linux cold RSS, request headers and 1 MB body spill, async native bcrypt, Postgres TLS, AbortSignal, and graceful shutdown. - [Serverless MicroVM Benchmark: Cold-Start Telemetry vs. 5M Requests at 500 Concurrency](https://fairyfly.dev/blog/microvm-benchmark.md): An honest telemetry breakdown of cold starts and sustained throughput across Fairyfly, Bun, Deno, and Node on 2 vCPU / 1 GB RAM microVMs. - [What is Fairyfly? How it works and why it works that way](https://fairyfly.dev/blog/what-is-fairyfly.md): A design deep dive into Fairyfly v0.2.0-beta — the four layers, the event loop, the HTTP hot path, and the limits that keep the runtime small. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.