Skip to main content
Deno 2 is finally here 🎉️
Learn more

Cabbage

deno doc

example workflow

deno native http server helper.

Quick start

import this module from mod.ts

Cabbage

create cabbage instance

// ...
const listener = Deno.listen({ port: 3000 });
const conn = await listener.accept();
const http = await Deno.serveHttp(conn);
const req = await http.nextRequest();

const ctx = new Cabbage(req);
ctx.respond("hello world");

listen

quickly listen and get Cabbage

listen((ctx) => ctx.respond("hello world"), 3000);

For details, lookupdeno doc https://deno.land/x/cabbage/mod.ts

Some example on example.ts