Getting started


srvx provides a unified standard API to create HTTP servers based on the standard web platform primitives (fetch, Request and Response) and works seamlessly with Deno, Bun and Node.js.

Why srvx?
How srvx is different from express, h3, nitro, ...

For Deno and Bun srvx unifies interface with zero overhead and for Node.js, creates a lightweight compatibility layer to wrap node:IncomingMessage as a standard Request object and convert final state of node:ServerResponse to a standard Response object.

Read more in Node.js support.

Quick start

A server can be started using serve function from srvx package.

import { serve } from "srvx";

const server = serve({
  fetch(request) {
    return new Response("๐Ÿ‘‹ Hello there!");
  },
});

await server.ready();

console.log(`๐Ÿš€ Server ready at ${server.url}`);