Build immediate interfaces.
Ring HTTP applications and configured native clients and transports in ClojureScript.
From a handler to a running application.
Explore the APIFind the API for your taskSignatures, settings, return values and walkthroughs.
Understand the contractsClients, transports and streamsDefaults, codecs, callbacks, cancellation and ownership.
Run complete programsLearn from working examplesSource, build files, expected results and step-by-step explanations.
Small pieces. Immediate interfaces.
Fast-Twitch turns ordinary ClojureScript functions into HTTP applications across Node, Deno, and Bun. Compose request maps, response maps, routing and middleware without hiding the runtime underneath. Configured client and server helpers also support TCP, WebSocket, SSE and MessageChannel through ordinary option maps.
Build a readable page first. Add a stream when the interface needs to change. Keep the application in your hands.
Your first handler
(ns hello.server
(:require [fast-twitch.routing :as routing]))
(defn home [_request]
{:status 200
:headers {"Content-Type" "text/plain; charset=utf-8"}
:body "Hello, Fast-Twitch!"})
(def handler
(routing/ft-handler home
{:protocol "HTTP/1.1" :remote-addr "127.0.0.1"}))
Start building
Get your first server running, understand request and response maps, or explore the routing API.
One framework, three runtimes
Fast-Twitch supports Node HTTP, Deno.serve, and Bun.serve. The examples include separate run tasks for these runtimes. Keep the handler contract consistent and test runtime-specific features on the runtime you deploy. Native transport capabilities differ: WebSocket server upgrades use Bun or Deno, and native EventSource requires a runtime that supplies it. Explore clients and native transports or run the transport examples.