Websi

Build web applications in TypeScript for the Web Platform

Websi is a universal HTTP abstraction for building web servers with TypeScript using modern Web Runtimes such as Deno, Cloudflare Workers, Bun or Lagon.

The library is inspired by Ruby's Rack, Python's WSGI or Clojure's Ring. It is built directly on top of Web APIs with no external dependencies. Websi comes with a router so you can use it as an alternative to Express, or any other web framework.

app.ts
import { Server } from 'websi';
import { GET } from 'websi/route';
import * as Response from 'websi/response';
 
const routes = [
  GET('/', () => Response.OK('Hello, Websi!')),
]
 
export default Server(routes)

Key features

  • Declarative
  • Functional
  • Typed